Article View: comp.sys.next.programmer
Article #1089Time function question
From: Jenny Doll
Date: Fri, 04 Sep 1992 07:00
Date: Fri, 04 Sep 1992 07:00
13 lines
964 bytes
964 bytes
Maybe this is a generic Unix programming question, but... Is there any way to find out whether or not your localtime is in daylight savings time (DST) or not? I have a time function that works when I'm using a non-DST (e.g. GMT-0800), however when I change my time zone to DST (e.g. PST), it breaks. If only I could tell. I thought the following would work: timePtr = localtime(&clock); isDST = timePtr->tm_isdst; but isDST is *always* 0, no matter where I set the clock. Any ideas? Thanks, ...Michael Brill
Technical Details
Message-ID:
<ybmnk3.yikes@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!csus.edu!netcom.com!yikesReferences:
<+alnfk#.yikes@netcom.com> <1992Sep4.005823.8849@u.washington.edu> <vbmnsq.yikes@netcom.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!csus.edu!netcom.com!yikes From: yikes@netcom.com (Jenny Doll) Subject: Time function question Message-ID: <ybmnk3.yikes@netcom.com> Date: Fri, 04 Sep 92 07:00:49 GMT Organization: Netcom - Online Communication Services (408 241-9760 guest) References: <+alnfk#.yikes@netcom.com> <1992Sep4.005823.8849@u.washington.edu> <vbmnsq.yikes@netcom.com> Lines: 14