[PATCH] test-parse-date: fix timezone name used to test local time with DST

Sébastien Brissaud sebastien at brissaud.name
Thu Mar 10 02:10:58 EST 2016


On 2016-02-15 13:52, Yuya Nishihara wrote:
> On Mon, 15 Feb 2016 08:04:40 +0100, Sébastien Brissaud wrote:
>> On 2016-02-13 09:19, Yuya Nishihara wrote:
>> > On Sat, 13 Feb 2016 07:24:11 +0100, Sébastien Brissaud wrote:
>> >> On 2016-02-11 07:29, Yuya Nishihara wrote:
>> 
>> >> > http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
>> 
>> Re-reading this page, DST start/end aren't optional and need to be
>> specified.
> 
> Indeed. It seems glibc is permissive, but the doc doesn't state it.

The POSIX definition allow for optional DST start/end:
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

Glibc conform to the specification even if its documentation mandate DST 
transition times.


But I found a bug in glibc that prevent it to accurately guess DST 
transition times on 32bit platforms with timezone files generated with 
zic from tzcode >= 2014c.

See https://sourceware.org/bugzilla/show_bug.cgi?id=19738

>> We can also define TZ by using the second format
>> (TZ="PST+8PDT+7,M4.1.0/02:00:00,M10.5.0/02:00:00") and thus only
>> requiring the system running the test to be POSIX compliant.
>> 
>> I prefer the second option which I found more explicit about the 
>> offset
>> definition and DST transitions.
> 
> I like the explicit version if it is cross-platform enough. It worked 
> on
> Windows, so perhaps it is okay.

Patch follow.

Thank you for taking time to help me with this issue.
-- 
sbr


More information about the Mercurial-devel mailing list