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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get time zone info for a network computer.

Get time zone info for a network computer.

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminquestion
4 Posts 2 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.
  • L Offline
    L Offline
    LizardWiz
    wrote on last edited by
    #1

    Can anyone tell me if I can get the time zone info for a computer on a local network? Please tell me if this is possible. Thanks, ~LizardWiz()

    D 1 Reply Last reply
    0
    • L LizardWiz

      Can anyone tell me if I can get the time zone info for a computer on a local network? Please tell me if this is possible. Thanks, ~LizardWiz()

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Is NetRemoteTOD() of any help?


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      L 1 Reply Last reply
      0
      • D David Crow

        Is NetRemoteTOD() of any help?


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        L Offline
        L Offline
        LizardWiz
        wrote on last edited by
        #3

        Hmmmmm. It is a start I guess. But the structure only seems to return the current bias of the time zone from GMT time, I don't really know if I am daylight savings time or not. I guess I can get the current date of the machine in GMT time (which is what that function seems to return), then convert it to a local time for my machine, then determine if its daylight savings time or not, then determine the appropriate time zone based on that bias amount... I am lucky I guess that we are only looking at Time Zones in the US... But won't Arizona get messed up in daylight savings time? Anyhow thanks for your help. If you have a better idea please let me know. ~LizardWiz()

        D 1 Reply Last reply
        0
        • L LizardWiz

          Hmmmmm. It is a start I guess. But the structure only seems to return the current bias of the time zone from GMT time, I don't really know if I am daylight savings time or not. I guess I can get the current date of the machine in GMT time (which is what that function seems to return), then convert it to a local time for my machine, then determine if its daylight savings time or not, then determine the appropriate time zone based on that bias amount... I am lucky I guess that we are only looking at Time Zones in the US... But won't Arizona get messed up in daylight savings time? Anyhow thanks for your help. If you have a better idea please let me know. ~LizardWiz()

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          LizardWiz wrote: It is a start I guess. But the structure only seems to return the current bias of the time zone from GMT time... Which is what you initially asked for. Determining DST on a remote computer is a different issue. Do you have access to the remote server? If so, could you create a little application (two dozen lines of code) that listened to a particular port, and when a request came in on that port, send back a reply indicating whether DST is in effect?


          "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

          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