Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Displaying time of Two Countries??

Displaying time of Two Countries??

Scheduled Pinned Locked Moved C#
csharptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Harish Krishnan
    wrote on last edited by
    #1

    :confused:Hi i have a Windows Application!! In which i need to Display the Time of Two Countries, For example: When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!! In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone"); ! Any helps or any sample codes or suggestion !! Please! Thanks in advance! One Shot dont miss you chance to go!!!!

    M A 2 Replies Last reply
    0
    • H Harish Krishnan

      :confused:Hi i have a Windows Application!! In which i need to Display the Time of Two Countries, For example: When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!! In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone"); ! Any helps or any sample codes or suggestion !! Please! Thanks in advance! One Shot dont miss you chance to go!!!!

      M Offline
      M Offline
      malharone
      wrote on last edited by
      #2

      Checkout http://www.codeproject.com/dotnet/WorldClock.asp?df=100&forumid=126704&select=1244859&msg=1244859#xx1000570xx[^]. It has everything you need!! - Malhar

      1 Reply Last reply
      0
      • H Harish Krishnan

        :confused:Hi i have a Windows Application!! In which i need to Display the Time of Two Countries, For example: When the application is Loaded, i want to Display the "Local Time/System Time" and "GMT time" and "Eastern Standard Time" on the window!! In .NET there is option only for getting the current time zone!!("System.TimeZone.CurrentTimeZone"); ! Any helps or any sample codes or suggestion !! Please! Thanks in advance! One Shot dont miss you chance to go!!!!

        A Offline
        A Offline
        Andy Moore
        wrote on last edited by
        #3

        You can do this by using the interop layer to call Win32 functions. The function GetLocalTime will give you the local system time. Calling GetSystemTime will give you the current GMT time. You then can use SystemTimeToTzSpecificLocalTime to convert GMT to Eastern Standard Time. Andy Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups