You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2002/04/08 17:21:54 UTC
cvs commit: apr/time/unix time.c
trawick 02/04/08 08:21:54
Modified: . CHANGES
time/unix time.c
Log:
Fix some daylight savings time breakage on (at least) AIX,
Solaris, and HP-UX. It still seems to work fine on Linux
and FreeBSD :)
When we calculated server_gmt_offset at startup, we left it
vague about whether or not the GMT time passed to mktime()
was in d.s.t. mode. Since it is GMT it clearly is not
d.s.t. Apparently libc was trying to be clever and figuring
out whether or not it was d.s.t.
Revision Changes Path
1.253 +3 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -r1.252 -r1.253
--- CHANGES 4 Apr 2002 18:33:56 -0000 1.252
+++ CHANGES 8 Apr 2002 15:21:54 -0000 1.253
@@ -1,5 +1,8 @@
Changes with APR b1
+ *) Fix some daylight savings time breakage on (at least) AIX,
+ Solaris, and HP-UX. [Jeff Trawick]
+
*) Added support for Posix semaphores (sem_open, et.al.) for mutex
locking. We use named semaphores in this implementation. The
default priority is between pthread and sysvsem.
1.66 +1 -1 apr/time/unix/time.c
Index: time.c
===================================================================
RCS file: /home/cvs/apr/time/unix/time.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- time.c 21 Mar 2002 10:16:45 -0000 1.65
+++ time.c 8 Apr 2002 15:21:54 -0000 1.66
@@ -356,7 +356,7 @@
#else
t = *gmtime(&t1);
#endif
- t.tm_isdst = -1;
+ t.tm_isdst = 0; /* we know this GMT time isn't daylight-savings */
t2 = mktime(&t);
server_gmt_offset = (apr_int32_t) difftime(t1, t2);
#endif