emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#22302: closed (25.1.50; time-stamp ignores time-st


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#22302: closed (25.1.50; time-stamp ignores time-stamp-time-zone)
Date: Tue, 12 Jan 2016 17:15:02 +0000

Your message dated Tue, 12 Jan 2016 09:14:49 -0800
with message-id <address@hidden>
and subject line Re: bug#22302: 25.1.50; time-stamp ignores time-stamp-time-zone
has caused the debbugs.gnu.org bug report #22302,
regarding 25.1.50; time-stamp ignores time-stamp-time-zone
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
22302: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22302
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.1.50; time-stamp ignores time-stamp-time-zone Date: Mon, 4 Jan 2016 00:18:52 +0000
Run emacs -Q and insert this text:
Time-stamp: <>

Then do:
M-: (require 'time-stamp) RET
M-x set-variable RET time-stamp-time-zone RET "UTC" RET
M-x time-stamp

Expected result: A UTC time stamp is inserted.
Actual result: A time stamp in the local time zone is inserted.

My analysis:
time-stamp uses time-stamp-string to compute the string to insert.
And that calls:
      (format-time-string (time-stamp-string-preprocess ts-format)
                          nil time-stamp-time-zone)
However, time-stamp-string-preprocess does all the work,
leaving nothing for format-time-string to do.
And it does so without consulting time-stamp-time-zone.

Admittedly, the doc string for time-stamp (no longer?) mentions 
time-stamp-time-zone.
However, the variable does exist, and its doc string indicates that it will be 
used by time-stamp.

– Harald

In GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.2.0, NS appkit-1404.34 Version 
10.11.2 (Build 15C50))
 of 2015-12-17
Repository revision: 23b5c22703eeee7b4fe6608ce12ffe3b87794933
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --with-ns'

Configured features:
RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  locale-coding-system: utf-8-unix



--- End Message ---
--- Begin Message --- Subject: Re: bug#22302: 25.1.50; time-stamp ignores time-stamp-time-zone Date: Tue, 12 Jan 2016 09:14:49 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0
On 01/11/2016 08:40 PM, Glenn Morris wrote:
Harald Hanche-Olsen wrote:

Run emacs -Q and insert this text:
Time-stamp: <>

Then do:
M-: (require 'time-stamp) RET
M-x set-variable RET time-stamp-time-zone RET "UTC" RET
M-x time-stamp

Expected result: A UTC time stamp is inserted.
Actual result: A time stamp in the local time zone is inserted.
This is due to af32fa956. Paul, could you have a look please?

Thanks for reporting this. I fixed the bug by installing the attached patch to emacs-25.

By the way, the value "UTC" is not portable to non-GNU systems, and POSIX says that in theory it could cause Emacs to crash. The value should be "UTC0" or (in Emacs 25) t. I see that some of Emacs's own source files have this issue, and plan to look into that.

Attachment: 0001-Fix-time-stamp-time-zone-bugs-introduced-in-July.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]