commit/XEmacs: Marcus Crestani: Fix calculation of time zone string in Fencode_time.
[email protected] Thu, 02 Oct 2014 08:19:54 -0000
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <[email protected]> |
1 new commit in XEmacs: https://bitbucket.org/xemacs/xemacs/commits/36dddf9d90d1/ Changeset: 36dddf9d90d1 User: Marcus Crestani Date: 2014-10-02 08:19:00+00:00 Summary: Fix calculation of time zone string in Fencode_time. Affected #: 2 files diff -r 7b42a97af782e406d9ebda1890a87479ca1000f5 -r 36dddf9d90d1c2b7fa2e60bb96c9f8bce365e924 src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-09-30 Marcus Crestani <[email protected]> + + * 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 <[email protected]> * floatfns.c (round_two_bignum_1): Fix memory leak. diff -r 7b42a97af782e406d9ebda1890a87479ca1000f5 -r 36dddf9d90d1c2b7fa2e60bb96c9f8bce365e924 src/editfns.c --- a/src/editfns.c +++ b/src/editfns.c @@ -1190,9 +1190,13 @@ else if (FIXNUMP (zone)) { 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) ? "-" : "+", + /* We specify the time zone in offset notation (see `man + tzset' for details). The offset indicates the value one + must add to local time to arrive at UTC. Thus, we sign + the offset with a `-' if the time zone is east of GMT; we + sign the offset with a `+' if the time zone is GMT (then + the offset is 0) or if the time zone is west of GMT. */ + sprintf (tzbuf, "XXX%s%d:%02d:%02d", (XFIXNUM (zone) < 0) ? "+" : "-", abszone / (60*60), (abszone/60) % 60, abszone % 60); tzstring = tzbuf; } Repository URL: https://bitbucket.org/xemacs/xemacs/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.