This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug time/11620] Bad design of timezone conversions
- From: "david.ward at ll dot mit.edu" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 13 Dec 2016 22:34:03 +0000
- Subject: [Bug time/11620] Bad design of timezone conversions
- Auto-submitted: auto-generated
- References: <bug-11620-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=11620
David Ward <david.ward at ll dot mit.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david.ward at ll dot mit.edu
--- Comment #9 from David Ward <david.ward at ll dot mit.edu> ---
(In reply to Maxim Yegorushkin from comment #8)
> Upstream tz project exposes the functions required for easy and thread-save
> timezone conversions, see
> https://github.com/eggert/tz/blob/master/private.h#L409
>
> Would it be possible to expose these NETBSD_INSPIRED 4 functions in glibc?
This now appears on the glibc master to-do list:
https://sourceware.org/glibc/wiki/Development_Todo/Master#MT-Safe_and_TZ-aware_functions
I also would like to see these functions added to glibc, especially for thread
safety reasons. The tz project implements these functions in a static library
(libtz.a), but that is only intended to be used directly with the bundled
utilities, as can be seen at the top of the header file referenced above:
/*
** This header is for use ONLY with the time conversion code.
** There is no guarantee that it will remain unchanged,
** or that it will remain at all.
** Do NOT copy it to any system include directory.
** Thank you!
*/
The same functions are also exposed by gnulib, but unfortunately its
implementation is not thread-safe: the localtime_rz and mktime_z functions are
essentially wrappers around localtime_r and mktime, which modify the TZ
environment variable before or after if needed.
--
You are receiving this mail because:
You are on the CC list for the bug.