Mercurial > hg > mercurial-crew-with-dirclash
diff tests/test-parse-date @ 3250:e96d2956eb4a
util.strdate: compute timestamp using UTC, not local timezone
author | Jose M. Prieto <jmprieto@gmx.net> |
---|---|
date | Tue, 03 Oct 2006 12:33:14 +0200 |
parents | c1974f65d781 |
children | e5c9a084ffe3 |
line wrap: on
line diff
--- a/tests/test-parse-date +++ b/tests/test-parse-date @@ -1,5 +1,6 @@ #!/bin/sh +# This runs with TZ="GMT" hg init echo "test-parse-date" > a hg add a @@ -13,4 +14,21 @@ echo "fail" >> a hg ci -d "should fail" -m "fail" hg ci -d "100000000000000000 1400" -m "fail" hg ci -d "100000 1400000" -m "fail" + +# Check with local timezone other than GMT and with DST +TZ="PST+8PDT" +export TZ +# PST=UTC-8 / PDT=UTC-7 +hg debugrebuildstate +echo "a" > a +hg ci -d "2006-07-15 13:30" -m "summer@UTC" +hg debugrebuildstate +echo "b" > a +hg ci -d "2006-07-15 13:30 +0500" -m "summer@UTC+5" +hg debugrebuildstate +echo "c" > a +hg ci -d "2006-01-15 13:30" -m "winter@UTC" +hg debugrebuildstate +echo "d" > a +hg ci -d "2006-01-15 13:30 +0500" -m "winter@UTC+5" hg log --template '{date|date}\n'