home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: 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
-
- 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
-
-