GNU bug report logs - #59368
icecat does not honor /etc/timezone starting with 102.3.0.

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 18 Nov 2022 19:51:02 UTC

Severity: normal

Merged with 55089

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 59368 <at> debbugs.gnu.org
Subject: bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
Date: Tue, 14 Feb 2023 00:00:25 -0500
Hi,

Pushing the investigation a bit, the Mozilla suite makes use of ICU to
get to know the host timezone name, and reviewing its source, I confirm
the behavior experienced.  The ICU-provided
'TimeZone::detectHostTimeZone' procedure calls to 'uprv_tzname' which
first attempts to read the TZ environment variable, else expects
/etc/localtime to be a symlink.

I found another explanation for the rationale behind the /etc/localtime
being a symlink design choice [0]:

   On many systems /etc/localtime is a symlink to a timezone file. It is
   conceivable that a program might be running when the /etc/localtime
   symlink is updated. If this were to happen, glibc would notice this
   when localtime is called and re-read the file before doing any time
   conversions.

[0]  https://blog.packagecloud.io/set-environment-variable-save-thousands-of-system-calls/

This article is worth reading and further demonstrates that simply
setting the TZ environment variable can lead to a large reduction of
system calls (from 11 to 1 for a every 'time' C library call).

So the choice to make here for Guix would be:

1. Do as most other distributions and have /etc/localtime be a symlink
pointing to the timezone file.

OR

2. Set TZ and reap some performance benefits.

The disadvantage of going with 2. is that users would then require to
restart their system following a reconfiguration changing their time
zone, which is not user friendly.

So I think I'd go with 2, knowing that savvy users wanting to shave some
extra resources can always set the TZ environment variable themselves.

Thoughts?

-- 
Thanks,
Maxim




This bug report was last modified 1 year and 329 days ago.

Previous Next


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