* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
@ 2022-11-18 19:50 Maxim Cournoyer
2023-02-13 22:17 ` Maxim Cournoyer
2023-02-15 19:00 ` Jonathan Brielmaier
0 siblings, 2 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2022-11-18 19:50 UTC (permalink / raw)
To: 59368
Hi,
I've recently found out that icecat wouldn't display time correctly for
my local time zone anymore (even when the 'resistFingerprinting' in
about:config is disabled, which would have usually resolved the
problem).
To test, I simply visit the https://everytimezone.com/, which shows your
current time.
This version from early September 2022 works:
--8<---------------cut here---------------start------------->8---
/gnu/store/bzpyas70s9j95dqad00vafks5icg51dm-icecat-91.13.0-guix0-preview1/bin/icecat
--8<---------------cut here---------------end--------------->8---
While this one from the end of September 2022 doesn't
--8<---------------cut here---------------start------------->8---
/gnu/store/bzpyas70s9j95dqad00vafks5icg51dm-icecat-91.13.0-guix0-preview1/bin/icecat
--8<---------------cut here---------------end--------------->8---
As a workaround, you can set your timezone explicitly (after ensuring
there are no longer running icecat processes) like so:
--8<---------------cut here---------------start------------->8---
TZ=America/Montreal icecat
--8<---------------cut here---------------end--------------->8---
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2022-11-18 19:50 bug#59368: icecat does not honor /etc/timezone starting with 102.3.0 Maxim Cournoyer
@ 2023-02-13 22:17 ` Maxim Cournoyer
2023-02-14 2:13 ` Maxim Cournoyer
2023-02-15 19:00 ` Jonathan Brielmaier
1 sibling, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-13 22:17 UTC (permalink / raw)
To: 59368
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi,
>
> I've recently found out that icecat wouldn't display time correctly for
> my local time zone anymore (even when the 'resistFingerprinting' in
> about:config is disabled, which would have usually resolved the
> problem).
>
> To test, I simply visit the https://everytimezone.com/, which shows your
> current time.
>
> This version from early September 2022 works:
>
> /gnu/store/bzpyas70s9j95dqad00vafks5icg51dm-icecat-91.13.0-guix0-preview1/bin/icecat
>
>
> While this one from the end of September 2022 doesn't
>
> /gnu/store/bzpyas70s9j95dqad00vafks5icg51dm-icecat-91.13.0-guix0-preview1/bin/icecat
>
The above problematic file name should have been that of icecat 102.3.0:
--8<---------------cut here---------------start------------->8---
/gnu/store/4gph2kbnmy64ii0fs9msig2jzjsnxdxi-icecat-102.3.0-guix0-preview1
--8<---------------cut here---------------end--------------->8---
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2023-02-13 22:17 ` Maxim Cournoyer
@ 2023-02-14 2:13 ` Maxim Cournoyer
2023-02-14 5:00 ` Maxim Cournoyer
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-14 2:13 UTC (permalink / raw)
To: 59368
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> Hi,
>>
>> I've recently found out that icecat wouldn't display time correctly for
>> my local time zone anymore (even when the 'resistFingerprinting' in
>> about:config is disabled, which would have usually resolved the
>> problem).
>>
>> To test, I simply visit the https://everytimezone.com/, which shows your
>> current time.
>>
>> This version from early September 2022 works:
>>
>> /gnu/store/bzpyas70s9j95dqad00vafks5icg51dm-icecat-91.13.0-guix0-preview1/bin/icecat
>>
>>
>> While this one from the end of September 2022 doesn't
>>
>> /gnu/store/bzpyas70s9j95dqad00vafks5icg51dm-icecat-91.13.0-guix0-preview1/bin/icecat
>>
>
> The above problematic file name should have been that of icecat 102.3.0:
>
> /gnu/store/4gph2kbnmy64ii0fs9msig2jzjsnxdxi-icecat-102.3.0-guix0-preview1
Looking through IRC logs, Tobias had shared the following insight about
the problem:
--8<---------------cut here---------------start------------->8---
2022-11-14 16:15:25 nckx podiki[m], apteryx: IceCat assumes that
/etc/localtime is a symlink to <zoneinfo>/share/zoneinfo/Your/TZ, and
bugs out if it isn't. Some GNOME software is similarly broken.
--8<---------------cut here---------------end--------------->8---
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2023-02-14 2:13 ` Maxim Cournoyer
@ 2023-02-14 5:00 ` Maxim Cournoyer
2023-02-14 16:32 ` Maxim Cournoyer
2023-02-14 16:34 ` Maxim Cournoyer
2 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-14 5:00 UTC (permalink / raw)
To: 59368
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2023-02-14 2:13 ` Maxim Cournoyer
2023-02-14 5:00 ` Maxim Cournoyer
@ 2023-02-14 16:32 ` Maxim Cournoyer
2023-02-14 16:34 ` Maxim Cournoyer
2 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-14 16:32 UTC (permalink / raw)
To: 59368
Hi,
The commit that updated icecat from version 91.13.0 to 102.3.0 is
4e88a7bfcb70f25219d9f2887121ae196431a115. One of the changes listed is
an update from icu4c (which is/was at version 69.1) to icu4c-71 (71.1).
ICU seems to deal with reading /etc/localtime and /etc/timezone, so
perhaps its behavior changed.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2023-02-14 2:13 ` Maxim Cournoyer
2023-02-14 5:00 ` Maxim Cournoyer
2023-02-14 16:32 ` Maxim Cournoyer
@ 2023-02-14 16:34 ` Maxim Cournoyer
2023-02-15 2:45 ` Maxim Cournoyer
2 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-14 16:34 UTC (permalink / raw)
To: 59368; +Cc: Tobias Geerinckx-Rice
Hello,
I've logged a feature request with ICU upstream at
https://unicode-org.atlassian.net/browse/ICU-22278.
In the meantime, we can apply a patch to our icu4c@71 on master or icu4c
on core-updates to substitute the zoneinfo file name in
--8<---------------cut here---------------start------------->8---
"#define TZZONEINFO "/usr/share/zoneinfo/""
--8<---------------cut here---------------end--------------->8---
from the putil.cpp file of ICU.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2023-02-14 16:34 ` Maxim Cournoyer
@ 2023-02-15 2:45 ` Maxim Cournoyer
0 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-15 2:45 UTC (permalink / raw)
To: 59368; +Cc: Tobias Geerinckx-Rice
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hello,
>
> I've logged a feature request with ICU upstream at
> https://unicode-org.atlassian.net/browse/ICU-22278.
>
> In the meantime, we can apply a patch to our icu4c@71 on master or icu4c
> on core-updates to substitute the zoneinfo file name in
>
> "#define TZZONEINFO "/usr/share/zoneinfo/""
>
> from the putil.cpp file of ICU.
It seems this was a red herring; patching this reference doesn't help.
I've made the following minimal reproducer to convince myself that ICU
worked in isolation:
--8<---------------cut here---------------start------------->8---
#include <stdio.h>
#include <stdlib.h>
#include <unicode/ucal.h>
#include <unicode/ustring.h>
int main() {
UChar result[100]; /* char16_t array */
UErrorCode errorCode = U_ZERO_ERROR;
char timezone[200];
ucal_getHostTimeZone(result, 100, &errorCode);
if (!u_austrncpy(timezone, result, 100)) {
printf("error: failed to convert UChar array to byte string\n");
exit(1);
}
printf("host timezone: %s\n", timezone);
}
--8<---------------cut here---------------end--------------->8---
Building and running it yields:
--8<---------------cut here---------------start------------->8---
$ make icu-repro && ./icu-repro
gcc -I ./install/include -L ./install/lib -licudata -licuuc -licui18n \
-g3 -O0 icu-repro.c -o icu-repro
host timezone: US/Eastern
--8<---------------cut here---------------end--------------->8---
Which is correct for my America/Montreal defined timezone.
To be continued...
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2022-11-18 19:50 bug#59368: icecat does not honor /etc/timezone starting with 102.3.0 Maxim Cournoyer
2023-02-13 22:17 ` Maxim Cournoyer
@ 2023-02-15 19:00 ` Jonathan Brielmaier
2023-02-15 19:50 ` Maxim Cournoyer
1 sibling, 1 reply; 9+ messages in thread
From: Jonathan Brielmaier @ 2023-02-15 19:00 UTC (permalink / raw)
To: 59368
Yes, its the wrong timezone: UTC instead of CEST with Icecat.
This resistFingerprinting doesn't seem to change something in that regard.
I can further say that I don't see this issue with firefox-esr or icedove.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
2023-02-15 19:00 ` Jonathan Brielmaier
@ 2023-02-15 19:50 ` Maxim Cournoyer
0 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-02-15 19:50 UTC (permalink / raw)
To: Jonathan Brielmaier; +Cc: 59368
Hi Jonathan,
Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:
> Yes, its the wrong timezone: UTC instead of CEST with Icecat.
> This resistFingerprinting doesn't seem to change something in that regard.
>
> I can further say that I don't see this issue with firefox-esr or icedove.
Thanks for confirming the issue. I investigated with a vanilla Firefox
build and reported my findings upstream [0]. The bug is triggered when
the default value for privacy.resistFingerprinting is set to 'true', as
done by the makeicecat script.
[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1817004
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-02-15 19:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-18 19:50 bug#59368: icecat does not honor /etc/timezone starting with 102.3.0 Maxim Cournoyer
2023-02-13 22:17 ` Maxim Cournoyer
2023-02-14 2:13 ` Maxim Cournoyer
2023-02-14 5:00 ` Maxim Cournoyer
2023-02-14 16:32 ` Maxim Cournoyer
2023-02-14 16:34 ` Maxim Cournoyer
2023-02-15 2:45 ` Maxim Cournoyer
2023-02-15 19:00 ` Jonathan Brielmaier
2023-02-15 19:50 ` Maxim Cournoyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.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).