From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 9794@debbugs.gnu.org
Subject: bug#9794: 24.0.90; `format-time-string' no good for %Z
Date: Thu, 20 Oct 2011 11:24:24 +0200 [thread overview]
Message-ID: <83botct3qv.fsf@gnu.org> (raw)
In-Reply-To: <4E9FD232.9090502@cs.ucla.edu>
> Date: Thu, 20 Oct 2011 00:48:02 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: Jason Rumney <jasonr@gnu.org>, drew.adams@oracle.com,
> 9794@debbugs.gnu.org
>
> Michael Schierl reported the current-time-zone issue to RMS in 2007; see
> <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
> But somehow the light bulb didn't go off, and current-time-zone
> wasn't fixed. Instead a workaround was installed, which basically
> said "On Windows, don't ever generate time zone names, because
> they might contain non-ASCII characters."
That's not a fair description of what was done. In response to my
question of whether this was too drastic a measure, Jason explained
the real reason for the change he did:
Non-ASCII is a side issue, and treating it as the main issue is what
caused us to install an incorrect fix originally.
The original issue reported a number of years ago, was that the timezone
names for the Japanese locale on Windows are not RFC 822 compliant. So
we suppressed them in certain conditions, but in fact, the timezone
names are not RFC 822 compliant in most locales on Windows. Unless we
use a lookup table to figure out which names are RFC compliant and which
aren't, then I don't see a way we can leave them enabled.
> Any code that assumes that (format-time-string "%Z") must generate
> an RFC822 zone is making an unwarranted assumption and should be
> fixed.
Fixed how? Given some arbitrary string, how can Lisp code check
whether it is or isn't compliant? Non-ASCII characters are easy to
check, but what about time zones that include only ASCII characters?
And anyway, if all bets are off about the strings returned by
current-time-zone, then what exactly is its contract?
If we are going to require Lisp code to check the values and reject
non-compliant ones, we should at the very least provide a utility
function to do that correctly. Can you suggest such a function?
> I did a quick scan for such code in Emacs and didn't find
> any. Perhaps there's some out-of-Emacs Lisp code that's making
> the assumption, but if so, that code needs to be fixed because
> in general it does not work and has never worked.
Jason, can you point out which package(s) needed an RFC822-compliant
time zone name? In the mail exchange I found, you just say
[...] since the result of current-time-zone is used for mail
headers, where non-ASCII characters are not allowed, and the POSIX
timezone names are expected [...]
next prev parent reply other threads:[~2011-10-20 9:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-19 6:44 bug#9794: 24.0.90; `format-time-string' no good for %Z Drew Adams
2011-10-19 7:43 ` Drew Adams
2011-10-19 8:33 ` Eli Zaretskii
2011-10-19 13:20 ` Jason Rumney
2011-10-19 14:28 ` Drew Adams
2011-10-19 15:26 ` Eli Zaretskii
2011-10-19 16:08 ` Eli Zaretskii
2011-10-20 7:48 ` Paul Eggert
2011-10-20 9:24 ` Eli Zaretskii [this message]
2011-10-20 9:46 ` Andreas Schwab
2011-10-20 10:05 ` Eli Zaretskii
2011-10-20 10:10 ` Andreas Schwab
2011-10-20 10:49 ` Eli Zaretskii
2011-10-20 11:22 ` Andreas Schwab
2011-10-20 12:58 ` Eli Zaretskii
2011-10-20 13:06 ` Andreas Schwab
2011-10-20 13:18 ` Eli Zaretskii
2011-10-20 15:23 ` Paul Eggert
2011-10-20 16:03 ` Eli Zaretskii
2011-10-21 15:40 ` Jason Rumney
2011-10-21 17:34 ` Paul Eggert
2011-10-22 9:21 ` bug#641: " Eli Zaretskii
2011-10-19 14:29 ` Drew Adams
2011-10-19 15:13 ` Eli Zaretskii
2011-10-19 7:47 ` Eli Zaretskii
2011-10-19 14:28 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83botct3qv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=9794@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).