FW: Questions

Paul Eggert eggert at CS.UCLA.EDU
Tue Apr 3 23:30:04 UTC 2007


> From: Fan_Zhenqiang at emc.com [mailto:Fan_Zhenqiang at emc.com] 
> Sent: Tuesday, April 03, 2007 3:21 PM

> Is there a function (in any of these source files) that takes a
> date/time value and tells whether the date/time is daylight saving time?

If T is a time_t value, and if localtime(&T) returns non-null, then
localtime(&T)->tm_isdst should tell you what you want to know (about T).

If the date/time value is some string like "2007-11-04 01:30" then
you're out of luck, because that time stamp is ambiguous in most of
North America: it might be DST, and it might be standard time.



More information about the tz mailing list