CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Advanced time

  1. #1
    Guest

    Advanced time

    Hi!

    In my program, I receive some information about time. It's the number of nanoseconds elapsed since 1st Jan 1955... So with some manipulation I can obtain the actual date and time. But since we switched to Advanced Time (or summer time? I don't konw the exact term in English) my program doesn't convert the time information correctly (it's one hour too late).

    So I'd like to know if there's a function to determine if we are in advanced time.

    Sorry if my question is not very clear...


    Jeff




  2. #2
    Join Date
    Apr 1999
    Posts
    11

    Re: Advanced time

    Hi,

    I wont ask you why do you use such a sophisticated way to calculate a current time instead of calling CTime functions.

    BUT:
    Check out "tm" structure
    specifically:
    tm.tm_isdst

    "Positive value if daylight saving time is in effect; 0 if daylight saving time is not in effect; negative value if status of daylight saving time is unknown. The C run-time library assumes the United States’s rules for implementing the calculation of Daylight Saving Time (DST). "
    MS MSDN

    i.e. called with localtime() or gmtime()

    only hope this works... you never know before you try it.

    regards
    Rem


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured