GNU bug report logs - #79437
30.2; world-clock silently and incorrectly parses invalid time zone

Previous Next

Package: emacs;

Reported by: "Jorge P. de Morais Neto" <jorge+git <at> disr.it>

Date: Fri, 12 Sep 2025 16:06:03 UTC

Severity: normal

Found in version 30.2

Full log


Message #8 received at 79437 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Jorge P. de Morais Neto" <jorge+git <at> disr.it>,
 Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 79437 <at> debbugs.gnu.org
Subject: Re: bug#79437: 30.2;
 world-clock silently and incorrectly parses invalid time zone
Date: Sat, 13 Sep 2025 09:31:30 +0300
> From: "Jorge P. de Morais Neto" <jorge+git <at> disr.it>
> Date: Fri, 12 Sep 2025 13:04:32 -0300
> 
> >From `emacs -Q':
> 
> 1. Invoke M-x world-clock to load the required Elisp libraries
> 2. Customize `zoneinfo-style-world-list' to "(("Europe/Pisa" "Pisa"))".
>    Set for session.
> 3. Invoke M-x world-clock again.
> 4. It says "Pisa sexta 12 setembro 15:50 Europe" (current time is 15:50
>    UTC).
> 
> I asked a friend in Pisa the local time and he reported the error.  I
> then realized world-clock said "Europe" instead of "Europe/Pisa".  I
> suspected "Europe/Pisa" is an invalid timezone name, so I looked into
> Gnome settings widget, and indeed Italy's only timezone is
> "Europe/Rome".  I then fixed `zoneinfo-style-world-list'.
> 
> Emacs /silently/ parsed "Europe/Pisa" as "Europe", inducing the user
> into error.  Yes, a previous user error caused the situation, but modern
> UX should detect and report predictable user errors, and typing an
> invalid timezone name is pretty predictable.

AFAIU, it isn't Emacs that silently interprets "Europe/Pisa" as
"Europe", it's your libc time-related functions.  I believe specifying
a non-existent file in timezone invokes undefined behavior, but maybe
Paul has more specific information about that.




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.