(wasn't in the moderator queue either)
-------- Forwarded Message --------
Subject: Re: [PATCH 21.5] Fix signs in time zone string.
Date: Tue, 30 Sep 2014 12:38:25 +0200
From: Adrian Aichner <adrian.aichner(a)gmail.com>
Hi Marcus, this patch looks wrong to me.
How could XEmacs and GNU Emacs both be wrong until now?
suggests that they are not including a + character for positive offsets,
which surprised me.
But zone offsets > 0 do not include the - sign, which is the same logic
XEmacs uses before your patch.
Also, why are you removing the REST argument in passing without mention?
On 30.09.2014 08:13, Marcus Crestani wrote:
Currently, Fencode_time calculates wrong dates in respect to local
timezones. The problem is caused by switched signs in the code that
builds the time zone string, the attached patch fixes this.
I'll push in two days if nobody objects.
diff --git a/src/ChangeLog b/src/ChangeLog
＠＠ -1,3 +1,9 ＠＠
+2014-09-30 Marcus Crestani <crestani(a)informatik.uni-tuebingen.de>
+ * editfns.c (Fencode_time): Switch signs when calculating the time
+ zone string. (The offset indicates the value one must add to the
+ local time to arrive at UTC.)
2014-09-23 Jerry James <james(a)xemacs.org>
* floatfns.c (round_two_bignum_1): Fix memory leak.
diff --git a/src/editfns.c b/src/editfns.c
＠＠ -1155,7 +1155,7 ＠＠
Year numbers less than 100 are treated just like other year numbers.
If you want them to stand for years in this century, you must do that yourself.
-arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE &rest REST)
+arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)
(int nargs, Lisp_Object *args))
＠＠ -1192,7 +1192,7 ＠＠
int abszone = abs (XFIXNUM (zone));
/* #### I have no idea what this conforms to,
but the compiler has stopped whining. */
- sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ?
"-" : "+",
+ sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ?
"+" : "-",
abszone / (60*60), (abszone/60) % 60, abszone % 60);
tzstring = tzbuf;
XEmacs-Patches mailing list