home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5969 < prev    next >
Encoding:
Text File  |  1992-09-03  |  942 b   |  25 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!decwrl!csus.edu!netcom.com!yikes
  3. From: yikes@netcom.com (Jenny Doll)
  4. Subject:   Time function question
  5. Message-ID: <ybmnk3.yikes@netcom.com>
  6. Date: Fri, 04 Sep 92 07:00:49 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. References: <+alnfk#.yikes@netcom.com> <1992Sep4.005823.8849@u.washington.edu> <vbmnsq.yikes@netcom.com>
  9. Lines: 14
  10.  
  11. Maybe this is a generic Unix programming question, but...
  12. Is there any way to find out whether or not your localtime is in 
  13. daylight savings time (DST) or not?  I have a time function that works
  14. when I'm using a non-DST (e.g. GMT-0800), however when I change my 
  15. time zone to DST (e.g. PST), it breaks.  If only I could tell.  I 
  16. thought the following would work:
  17.  
  18. timePtr = localtime(&clock);
  19. isDST = timePtr->tm_isdst;
  20.  
  21. but isDST is *always* 0, no matter where I set the clock.  Any ideas?
  22.  
  23. Thanks, ...Michael Brill
  24.  
  25.