[PATCH] test-parse-date: defines explicit start/end dates for DST
Sébastien Brissaud
sebastien at brissaud.name
Thu Mar 10 07:12:24 UTC 2016
# HG changeset patch
# User Sébastien Brissaud <sebastien at brissaud.name>
# Date 1455470337 -3600
# Sun Feb 14 18:18:57 2016 +0100
# Node ID 23797e0fd7cfde38c57e7ef6adfd7b0ae5b344d2
# Parent 1c658391b22fb4d98ccfb60c0e57315b55634117
test-parse-date: defines explicit start/end dates for DST
Prior to this patch, DST times where tested by specifying a custom TZ
environment variable that didn't defined DST transition times.
Due to a bug in glibc, the test fail on 32bits platforms that use timezone
files generated by zic from tzcode >= 2014c (glibc >= 2.20).
See https://sourceware.org/bugzilla/show_bug.cgi?id=19738
By defining explicit transition times for DST in the TZ environment variable,
the test is now independant to how the system guess those transition times.
diff --git a/tests/test-parse-date.t b/tests/test-parse-date.t
--- a/tests/test-parse-date.t
+++ b/tests/test-parse-date.t
@@ -25,16 +25,18 @@ This runs with TZ="GMT"
$ hg ci -d "100000 1400000" -m "fail"
abort: impossible time zone offset: 1400000
[255]
Check with local timezone other than GMT and with DST
- $ TZ="PST+8PDT"
+ $ TZ="PST+8PDT+7,M4.1.0/02:00:00,M10.5.0/02:00:00"
$ export TZ
PST=UTC-8 / PDT=UTC-7
+Summer time begins on April's first Sunday at 2:00am,
+and ends on October's last Sunday at 2:00am.
$ hg debugrebuildstate
$ echo "a" > a
$ hg ci -d "2006-07-15 13:30" -m "summer at UTC-7"
$ hg debugrebuildstate
$ echo "b" > a
More information about the Mercurial-devel
mailing list