Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libutil fix timezone bugs in rev.1.11 and rev.1.13. PR/...



details:   https://anonhg.NetBSD.org/src/rev/0383fba183c5
branches:  trunk
changeset: 787345:0383fba183c5
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Jun 12 01:46:07 2013 +0000

description:
fix timezone bugs in rev.1.11 and rev.1.13.  PR/47916.

diffstat:

 lib/libutil/parsedate.y |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 3430701b72f7 -r 0383fba183c5 lib/libutil/parsedate.y
--- a/lib/libutil/parsedate.y   Wed Jun 12 01:36:52 2013 +0000
+++ b/lib/libutil/parsedate.y   Wed Jun 12 01:46:07 2013 +0000
@@ -14,7 +14,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __RCSID
-__RCSID("$NetBSD: parsedate.y,v 1.15 2013/06/12 01:31:24 yamt Exp $");
+__RCSID("$NetBSD: parsedate.y,v 1.16 2013/06/12 01:46:07 yamt Exp $");
 #endif
 
 #include <stdio.h>
@@ -593,7 +593,7 @@
     time_t     Hours,          /* Hour of day [0-24] */
     time_t     Minutes,        /* Minute of hour [0-59] */
     time_t     Seconds,        /* Second of minute [0-60] */
-    time_t     Timezone,       /* Timezone as seconds west of UTC */
+    time_t     Timezone,       /* Timezone as minutes east of UTC */
     MERIDIAN   Meridian,       /* Hours are am/pm/24 hour clock */
     DSTMODE    DSTmode         /* DST on/off/maybe */
 )
@@ -623,7 +623,7 @@
 
     /* We rely on mktime_z(NULL, ...) working in UTC, not in local time. */
     result = mktime_z(NULL, &tm);
-    result -= Timezone;
+    result += Timezone * 60;
     return result;
 }
 



Home | Main Index | Thread Index | Old Index