Hi,

Does localtime() function automatically corrects for daylight savings time?

Actually I am showing the system time in my UI and it should adjust for
daylight saving time and show it accordingly. Do I need to call __tzset()?
If I dont call this, does it take the deafult?

Thanks in advance,
Sateesh.

RE: localtime() by anonymous

anonymous
Tue Mar 02 08:31:09 CST 2004

sure does
take a look at the tm_isdst value in the tm struct.

RE: localtime() by anonymous

anonymous
Mon May 17 13:36:08 CDT 2004

Yes, isDST does work, but it doesn't seem to reflect the current value when it is in the 2 AM hour

Looking at the Adjust Date/Time clock it shows <TZ> Daylight Savings Time, and the TM struct show
the correct values such as tm_hour = 1, etc yet tm_isdst shows 0

Any ideas