Module Name:    src
Committed By:   yamt
Date:           Wed Jun 12 01:46:07 UTC 2013

Modified Files:
        src/lib/libutil: parsedate.y

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


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libutil/parsedate.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libutil/parsedate.y
diff -u src/lib/libutil/parsedate.y:1.15 src/lib/libutil/parsedate.y:1.16
--- src/lib/libutil/parsedate.y:1.15	Wed Jun 12 01:31:24 2013
+++ src/lib/libutil/parsedate.y	Wed Jun 12 01:46:07 2013
@@ -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 @@ Convert(
     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 @@ Convert(
 
     /* 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;
 }
 

Reply via email to