From: Eli Zaretskii <eliz@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: eggert@cs.ucla.edu, 9794@debbugs.gnu.org
Subject: bug#9794: 24.0.90; `format-time-string' no good for %Z
Date: Thu, 20 Oct 2011 14:58:51 +0200 [thread overview]
Message-ID: <831uu7u8dw.fsf@gnu.org> (raw)
In-Reply-To: <m3botbewlp.fsf@hase.home>
> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: eggert@cs.ucla.edu, 9794@debbugs.gnu.org
> Date: Thu, 20 Oct 2011 13:22:26 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > No, I don't, because setting TZ=EST or some such in the environment
> > will produce a compliant string.
>
> It does not match [+-]NNNN.
But the output of %Z or current-time-zone isn't supposed to. E.g., on
fencepost.gnu.org, I get "EDT". It's %z that produces [-+]NNNN.
To step back a notch, the original issue was that current-time-zone
can produce strings that are not RFC822 compliant, even on a Posix
system, if the luser sets TZ to some arbitrary string. Paul says that
any software that uses the output of current-time-zone should be able
to detect this non-compliance and use %z instead. I'm asking how to
do that.
With a previous "work-around" on Windows, the test was easy: the
output was a blank string, which is definitely not RFC822 compliant.
If we remove that work-around, we can get something like "Pacific
Daylight Time" instead, which is invalid according to RFC822. I'm
asking how to detect such "invalid" zone names.
next prev parent reply other threads:[~2011-10-20 12:58 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
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 [this message]
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=831uu7u8dw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=9794@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=schwab@linux-m68k.org \
/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).