scsh-checkins
[Top] [All Lists]

[Scsh-checkins] CVS: scsh-0.6/scsh time1.c,1.4,1.5

To: scsh-checkins@lists.sourceforge.net
Subject: [Scsh-checkins] CVS: scsh-0.6/scsh time1.c,1.4,1.5
From: Mike Sperber <sperber@users.sourceforge.net>
Date: Wed, 11 Jul 2001 06:08:54 -0700
List-id: <scsh-checkins.lists.sourceforge.net>
Sender: scsh-checkins-admin@lists.sourceforge.net
Update of /cvsroot/scsh/scsh-0.6/scsh
In directory usw-pr-cvs1:/tmp/cvs-serv17103

Modified Files:
        time1.c 
Log Message:
Use a -1 value for tm_isdst to guess time zone if it's unspecified.


Index: time1.c
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/time1.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** time1.c     2001/01/01 16:45:32     1.4
--- time1.c     2001/07/11 13:08:52     1.5
***************
*** 227,231 ****
      d.tm_year = s48_extract_fixnum (year);
      d.tm_wday = 0;    d.tm_yday = 0;        
-     d.tm_isdst = (summer == S48_FALSE) ? 0 : 1;
  
      if( S48_FIXNUM_P(tz_secs) ) {             /* Offset from GMT in seconds. 
*/
--- 227,230 ----
***************
*** 244,247 ****
--- 243,249 ----
        }
  
+     /* ### Note that we *still* don't implement the manual paragraph
+        with "When calcultating with time-zones, the date's SUMMER?
+        field is used to resolve ambiguities. */
      else if( S48_STRING_P(tz_name) ) {        /* Time zone */
        char *newenv[2];
***************
*** 250,253 ****
--- 252,257 ----
        tzset(); /* NetBSD, SunOS POSIX-noncompliance requires this. */
        errno = 0;
+ 
+       d.tm_isdst = -1;
        t = mktime(&d);
        if ((t == -1) && (errno != 0))
***************
*** 259,262 ****
--- 263,267 ----
        tzset(); /* NetBSD, SunOS POSIX-noncompliance requires this. */
        errno = 0;
+       d.tm_isdst = -1;
        t = mktime(&d);
        if ((t == -1) && (errno != 0))



<Prev in Thread] Current Thread [Next in Thread>
  • [Scsh-checkins] CVS: scsh-0.6/scsh time1.c,1.4,1.5, Mike Sperber <=