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


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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 59368 <at> debbugs.gnu.org
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>
Subject: Re: bug#59368: icecat does not honor /etc/timezone starting with
 102.3.0.
Date: Tue, 14 Feb 2023 21:45:48 -0500
Hi,

Maxim Cournoyer <maxim.cournoyer <at> 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 <at> 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




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

Previous Next


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