Mercurial > hg
comparison tests/test-parse-date @ 3255: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 |
comparison
equal
deleted
inserted
replaced
3243:1d3aceae87c1 | 3255:e96d2956eb4a |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # This runs with TZ="GMT" | |
3 hg init | 4 hg init |
4 echo "test-parse-date" > a | 5 echo "test-parse-date" > a |
5 hg add a | 6 hg add a |
6 hg ci -d "2006-02-01 13:00:30" -m "rev 0" | 7 hg ci -d "2006-02-01 13:00:30" -m "rev 0" |
7 echo "hi!" >> a | 8 echo "hi!" >> a |
11 hg ci -d "1150000000 14400" -m "rev 4 (merge)" | 12 hg ci -d "1150000000 14400" -m "rev 4 (merge)" |
12 echo "fail" >> a | 13 echo "fail" >> a |
13 hg ci -d "should fail" -m "fail" | 14 hg ci -d "should fail" -m "fail" |
14 hg ci -d "100000000000000000 1400" -m "fail" | 15 hg ci -d "100000000000000000 1400" -m "fail" |
15 hg ci -d "100000 1400000" -m "fail" | 16 hg ci -d "100000 1400000" -m "fail" |
17 | |
18 # Check with local timezone other than GMT and with DST | |
19 TZ="PST+8PDT" | |
20 export TZ | |
21 # PST=UTC-8 / PDT=UTC-7 | |
22 hg debugrebuildstate | |
23 echo "a" > a | |
24 hg ci -d "2006-07-15 13:30" -m "summer@UTC" | |
25 hg debugrebuildstate | |
26 echo "b" > a | |
27 hg ci -d "2006-07-15 13:30 +0500" -m "summer@UTC+5" | |
28 hg debugrebuildstate | |
29 echo "c" > a | |
30 hg ci -d "2006-01-15 13:30" -m "winter@UTC" | |
31 hg debugrebuildstate | |
32 echo "d" > a | |
33 hg ci -d "2006-01-15 13:30 +0500" -m "winter@UTC+5" | |
16 hg log --template '{date|date}\n' | 34 hg log --template '{date|date}\n' |