Time Zone

This is a discussion on Time Zone within the C Programming forums, part of the General Programming Boards category; Is there a way to get the local time zone with C on Windows and Unix?...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    8

    Time Zone

    Is there a way to get the local time zone with C on Windows and Unix?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    In Unix, you can use gettimeofday(), in Windows it's GetDynamicTimeZoneInfo()

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    8
    Thanks a lot! You're a life saver!

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by fragrax View Post
    Thanks a lot! You're a life saver!
    No, I'm just able to use google..

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Representing floats with color?
    By DrSnuggles in forum C++ Programming
    Replies: 113
    Last Post: 12-30-2008, 09:11 AM
  2. Using pointers
    By Big_0_72 in forum C Programming
    Replies: 3
    Last Post: 10-28-2008, 08:51 PM
  3. calculating user time and time elapsed
    By Neildadon in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2003, 06:00 PM
  4. Checking parts of a structure
    By DocDroopy in forum C Programming
    Replies: 11
    Last Post: 08-05-2002, 08:45 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21