From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 59368@debbugs.gnu.org
Cc: Tobias Geerinckx-Rice <me@tobias.gr>
Subject: bug#59368: icecat does not honor /etc/timezone starting with 102.3.0.
Date: Tue, 14 Feb 2023 21:45:48 -0500 [thread overview]
Message-ID: <875yc3hcir.fsf@gmail.com> (raw)
In-Reply-To: <87y1p0b3z1.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 14 Feb 2023 11:34:42 -0500")
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
next prev parent reply other threads:[~2023-02-15 2:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-02-15 19:00 ` Jonathan Brielmaier
2023-02-15 19:50 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875yc3hcir.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=59368@debbugs.gnu.org \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).