GNU bug report logs -
#59368
icecat does not honor /etc/timezone starting with 102.3.0.
Previous Next
Full log
Message #23 received at 59368 <at> debbugs.gnu.org (full text, mbox):
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.