Click to See Complete Forum and Search --> : Advanced time


April 7th, 1999, 12:38 PM
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

Remek Zajac
April 10th, 1999, 07:03 PM
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