Show More
@@ -1,83 +1,87 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | # This runs with TZ="GMT" |
|
4 | 4 | hg init |
|
5 | 5 | echo "test-parse-date" > a |
|
6 | 6 | hg add a |
|
7 | 7 | hg ci -d "2006-02-01 13:00:30" -m "rev 0" |
|
8 | 8 | echo "hi!" >> a |
|
9 | 9 | hg ci -d "2006-02-01 13:00:30 -0500" -m "rev 1" |
|
10 | 10 | hg tag -d "2006-04-15 13:30" "Hi" |
|
11 | 11 | hg backout --merge -d "2006-04-15 13:30 +0200" -m "rev 3" 1 |
|
12 | 12 | hg ci -d "1150000000 14400" -m "rev 4 (merge)" |
|
13 | 13 | echo "fail" >> a |
|
14 | 14 | hg ci -d "should fail" -m "fail" |
|
15 | 15 | hg ci -d "100000000000000000 1400" -m "fail" |
|
16 | 16 | hg ci -d "100000 1400000" -m "fail" |
|
17 | 17 | |
|
18 | 18 | # Check with local timezone other than GMT and with DST |
|
19 | 19 | TZ="PST+8PDT" |
|
20 | 20 | export TZ |
|
21 | 21 | # PST=UTC-8 / PDT=UTC-7 |
|
22 | 22 | hg debugrebuildstate |
|
23 | 23 | echo "a" > a |
|
24 | 24 | hg ci -d "2006-07-15 13:30" -m "summer@UTC-7" |
|
25 | 25 | hg debugrebuildstate |
|
26 | 26 | echo "b" > a |
|
27 | 27 | hg ci -d "2006-07-15 13:30 +0500" -m "summer@UTC+5" |
|
28 | 28 | hg debugrebuildstate |
|
29 | 29 | echo "c" > a |
|
30 | 30 | hg ci -d "2006-01-15 13:30" -m "winter@UTC-8" |
|
31 | 31 | hg debugrebuildstate |
|
32 | 32 | echo "d" > a |
|
33 | 33 | hg ci -d "2006-01-15 13:30 +0500" -m "winter@UTC+5" |
|
34 | 34 | hg log --template '{date|date}\n' |
|
35 | 35 | |
|
36 | 36 | # Test issue1014 (fractional timezones) |
|
37 | 37 | hg debugdate "1000000000 -16200" # 0430 |
|
38 | 38 | hg debugdate "1000000000 -15300" # 0415 |
|
39 | 39 | hg debugdate "1000000000 -14400" # 0400 |
|
40 | 40 | hg debugdate "1000000000 0" # GMT |
|
41 | 41 | hg debugdate "1000000000 14400" # -0400 |
|
42 | 42 | hg debugdate "1000000000 15300" # -0415 |
|
43 | 43 | hg debugdate "1000000000 16200" # -0430 |
|
44 | 44 | hg debugdate "Sat Sep 08 21:16:40 2001 +0430" |
|
45 | 45 | hg debugdate "Sat Sep 08 21:16:40 2001 -0430" |
|
46 | 46 | |
|
47 | # Test 12-hours times | |
|
48 | hg debugdate "2006-02-01 1:00:30PM +0000" | |
|
49 | hg debugdate "1:00:30PM" > /dev/null || echo 'failed' | |
|
50 | ||
|
47 | 51 | #Test date formats with '>' or '<' accompanied by space characters |
|
48 | 52 | hg log -d '>' --template '{date|date}\n' |
|
49 | 53 | hg log -d '<' hg log -d '>' --template '{date|date}\n' |
|
50 | 54 | |
|
51 | 55 | hg log -d ' >' --template '{date|date}\n' |
|
52 | 56 | hg log -d ' <' --template '{date|date}\n' |
|
53 | 57 | |
|
54 | 58 | hg log -d '> ' --template '{date|date}\n' |
|
55 | 59 | hg log -d '< ' --template '{date|date}\n' |
|
56 | 60 | |
|
57 | 61 | hg log -d ' > ' --template '{date|date}\n' |
|
58 | 62 | hg log -d ' < ' --template '{date|date}\n' |
|
59 | 63 | |
|
60 | 64 | |
|
61 | 65 | hg log -d '>02/01' --template '{date|date}\n' |
|
62 | 66 | hg log -d '<02/01' --template '{date|date}\n' |
|
63 | 67 | |
|
64 | 68 | hg log -d ' >02/01' --template '{date|date}\n' |
|
65 | 69 | hg log -d ' <02/01' --template '{date|date}\n' |
|
66 | 70 | |
|
67 | 71 | hg log -d '> 02/01' --template '{date|date}\n' |
|
68 | 72 | hg log -d '< 02/01' --template '{date|date}\n' |
|
69 | 73 | |
|
70 | 74 | hg log -d ' > 02/01' --template '{date|date}\n' |
|
71 | 75 | hg log -d ' < 02/01' --template '{date|date}\n' |
|
72 | 76 | |
|
73 | 77 | hg log -d '>02/01 ' --template '{date|date}\n' |
|
74 | 78 | hg log -d '<02/01 ' --template '{date|date}\n' |
|
75 | 79 | |
|
76 | 80 | hg log -d ' >02/01 ' --template '{date|date}\n' |
|
77 | 81 | hg log -d ' <02/01 ' --template '{date|date}\n' |
|
78 | 82 | |
|
79 | 83 | hg log -d '> 02/01 ' --template '{date|date}\n' |
|
80 | 84 | hg log -d '< 02/01 ' --template '{date|date}\n' |
|
81 | 85 | |
|
82 | 86 | hg log -d ' > 02/01 ' --template '{date|date}\n' |
|
83 | 87 | hg log -d ' < 02/01 ' --template '{date|date}\n' No newline at end of file |
@@ -1,144 +1,146 | |||
|
1 | 1 | reverting a |
|
2 | 2 | created new head |
|
3 | 3 | changeset 3:107ce1ee2b43 backs out changeset 1:25a1420a55f8 |
|
4 | 4 | merging with changeset 3:107ce1ee2b43 |
|
5 | 5 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
6 | 6 | (branch merge, don't forget to commit) |
|
7 | 7 | abort: invalid date: 'should fail' |
|
8 | 8 | abort: date exceeds 32 bits: 100000000000000000 |
|
9 | 9 | abort: impossible time zone offset: 1400000 |
|
10 | 10 | Sun Jan 15 13:30:00 2006 +0500 |
|
11 | 11 | Sun Jan 15 13:30:00 2006 -0800 |
|
12 | 12 | Sat Jul 15 13:30:00 2006 +0500 |
|
13 | 13 | Sat Jul 15 13:30:00 2006 -0700 |
|
14 | 14 | Sun Jun 11 00:26:40 2006 -0400 |
|
15 | 15 | Sat Apr 15 13:30:00 2006 +0200 |
|
16 | 16 | Sat Apr 15 13:30:00 2006 +0000 |
|
17 | 17 | Wed Feb 01 13:00:30 2006 -0500 |
|
18 | 18 | Wed Feb 01 13:00:30 2006 +0000 |
|
19 | 19 | internal: 1000000000 -16200 |
|
20 | 20 | standard: Sun Sep 09 06:16:40 2001 +0430 |
|
21 | 21 | internal: 1000000000 -15300 |
|
22 | 22 | standard: Sun Sep 09 06:01:40 2001 +0415 |
|
23 | 23 | internal: 1000000000 -14400 |
|
24 | 24 | standard: Sun Sep 09 05:46:40 2001 +0400 |
|
25 | 25 | internal: 1000000000 0 |
|
26 | 26 | standard: Sun Sep 09 01:46:40 2001 +0000 |
|
27 | 27 | internal: 1000000000 14400 |
|
28 | 28 | standard: Sat Sep 08 21:46:40 2001 -0400 |
|
29 | 29 | internal: 1000000000 15300 |
|
30 | 30 | standard: Sat Sep 08 21:31:40 2001 -0415 |
|
31 | 31 | internal: 1000000000 16200 |
|
32 | 32 | standard: Sat Sep 08 21:16:40 2001 -0430 |
|
33 | 33 | internal: 999967600 -16200 |
|
34 | 34 | standard: Sat Sep 08 21:16:40 2001 +0430 |
|
35 | 35 | internal: 1000000000 16200 |
|
36 | 36 | standard: Sat Sep 08 21:16:40 2001 -0430 |
|
37 | internal: 1138798830 0 | |
|
38 | standard: Wed Feb 01 13:00:30 2006 +0000 | |
|
37 | 39 | Sun Jan 15 13:30:00 2006 +0500 |
|
38 | 40 | Sun Jan 15 13:30:00 2006 -0800 |
|
39 | 41 | Sat Jul 15 13:30:00 2006 +0500 |
|
40 | 42 | Sat Jul 15 13:30:00 2006 -0700 |
|
41 | 43 | Sun Jun 11 00:26:40 2006 -0400 |
|
42 | 44 | Sat Apr 15 13:30:00 2006 +0200 |
|
43 | 45 | Sat Apr 15 13:30:00 2006 +0000 |
|
44 | 46 | Wed Feb 01 13:00:30 2006 -0500 |
|
45 | 47 | Wed Feb 01 13:00:30 2006 +0000 |
|
46 | 48 | Sun Jan 15 13:30:00 2006 +0500 |
|
47 | 49 | Sun Jan 15 13:30:00 2006 -0800 |
|
48 | 50 | Sat Jul 15 13:30:00 2006 +0500 |
|
49 | 51 | Sat Jul 15 13:30:00 2006 -0700 |
|
50 | 52 | Sun Jun 11 00:26:40 2006 -0400 |
|
51 | 53 | Sat Apr 15 13:30:00 2006 +0200 |
|
52 | 54 | Sat Apr 15 13:30:00 2006 +0000 |
|
53 | 55 | Wed Feb 01 13:00:30 2006 -0500 |
|
54 | 56 | Wed Feb 01 13:00:30 2006 +0000 |
|
55 | 57 | Sun Jan 15 13:30:00 2006 +0500 |
|
56 | 58 | Sun Jan 15 13:30:00 2006 -0800 |
|
57 | 59 | Sat Jul 15 13:30:00 2006 +0500 |
|
58 | 60 | Sat Jul 15 13:30:00 2006 -0700 |
|
59 | 61 | Sun Jun 11 00:26:40 2006 -0400 |
|
60 | 62 | Sat Apr 15 13:30:00 2006 +0200 |
|
61 | 63 | Sat Apr 15 13:30:00 2006 +0000 |
|
62 | 64 | Wed Feb 01 13:00:30 2006 -0500 |
|
63 | 65 | Wed Feb 01 13:00:30 2006 +0000 |
|
64 | 66 | Sun Jan 15 13:30:00 2006 +0500 |
|
65 | 67 | Sun Jan 15 13:30:00 2006 -0800 |
|
66 | 68 | Sat Jul 15 13:30:00 2006 +0500 |
|
67 | 69 | Sat Jul 15 13:30:00 2006 -0700 |
|
68 | 70 | Sun Jun 11 00:26:40 2006 -0400 |
|
69 | 71 | Sat Apr 15 13:30:00 2006 +0200 |
|
70 | 72 | Sat Apr 15 13:30:00 2006 +0000 |
|
71 | 73 | Wed Feb 01 13:00:30 2006 -0500 |
|
72 | 74 | Wed Feb 01 13:00:30 2006 +0000 |
|
73 | 75 | Sun Jan 15 13:30:00 2006 +0500 |
|
74 | 76 | Sun Jan 15 13:30:00 2006 -0800 |
|
75 | 77 | Sat Jul 15 13:30:00 2006 +0500 |
|
76 | 78 | Sat Jul 15 13:30:00 2006 -0700 |
|
77 | 79 | Sun Jun 11 00:26:40 2006 -0400 |
|
78 | 80 | Sat Apr 15 13:30:00 2006 +0200 |
|
79 | 81 | Sat Apr 15 13:30:00 2006 +0000 |
|
80 | 82 | Wed Feb 01 13:00:30 2006 -0500 |
|
81 | 83 | Wed Feb 01 13:00:30 2006 +0000 |
|
82 | 84 | Sun Jan 15 13:30:00 2006 +0500 |
|
83 | 85 | Sun Jan 15 13:30:00 2006 -0800 |
|
84 | 86 | Sat Jul 15 13:30:00 2006 +0500 |
|
85 | 87 | Sat Jul 15 13:30:00 2006 -0700 |
|
86 | 88 | Sun Jun 11 00:26:40 2006 -0400 |
|
87 | 89 | Sat Apr 15 13:30:00 2006 +0200 |
|
88 | 90 | Sat Apr 15 13:30:00 2006 +0000 |
|
89 | 91 | Wed Feb 01 13:00:30 2006 -0500 |
|
90 | 92 | Wed Feb 01 13:00:30 2006 +0000 |
|
91 | 93 | Sun Jan 15 13:30:00 2006 +0500 |
|
92 | 94 | Sun Jan 15 13:30:00 2006 -0800 |
|
93 | 95 | Sat Jul 15 13:30:00 2006 +0500 |
|
94 | 96 | Sat Jul 15 13:30:00 2006 -0700 |
|
95 | 97 | Sun Jun 11 00:26:40 2006 -0400 |
|
96 | 98 | Sat Apr 15 13:30:00 2006 +0200 |
|
97 | 99 | Sat Apr 15 13:30:00 2006 +0000 |
|
98 | 100 | Wed Feb 01 13:00:30 2006 -0500 |
|
99 | 101 | Wed Feb 01 13:00:30 2006 +0000 |
|
100 | 102 | Sun Jan 15 13:30:00 2006 +0500 |
|
101 | 103 | Sun Jan 15 13:30:00 2006 -0800 |
|
102 | 104 | Sat Jul 15 13:30:00 2006 +0500 |
|
103 | 105 | Sat Jul 15 13:30:00 2006 -0700 |
|
104 | 106 | Sun Jun 11 00:26:40 2006 -0400 |
|
105 | 107 | Sat Apr 15 13:30:00 2006 +0200 |
|
106 | 108 | Sat Apr 15 13:30:00 2006 +0000 |
|
107 | 109 | Wed Feb 01 13:00:30 2006 -0500 |
|
108 | 110 | Wed Feb 01 13:00:30 2006 +0000 |
|
109 | 111 | Sun Jan 15 13:30:00 2006 +0500 |
|
110 | 112 | Sun Jan 15 13:30:00 2006 -0800 |
|
111 | 113 | Sat Jul 15 13:30:00 2006 +0500 |
|
112 | 114 | Sat Jul 15 13:30:00 2006 -0700 |
|
113 | 115 | Sun Jun 11 00:26:40 2006 -0400 |
|
114 | 116 | Sat Apr 15 13:30:00 2006 +0200 |
|
115 | 117 | Sat Apr 15 13:30:00 2006 +0000 |
|
116 | 118 | Wed Feb 01 13:00:30 2006 -0500 |
|
117 | 119 | Wed Feb 01 13:00:30 2006 +0000 |
|
118 | 120 | Sun Jan 15 13:30:00 2006 +0500 |
|
119 | 121 | Sun Jan 15 13:30:00 2006 -0800 |
|
120 | 122 | Sat Jul 15 13:30:00 2006 +0500 |
|
121 | 123 | Sat Jul 15 13:30:00 2006 -0700 |
|
122 | 124 | Sun Jun 11 00:26:40 2006 -0400 |
|
123 | 125 | Sat Apr 15 13:30:00 2006 +0200 |
|
124 | 126 | Sat Apr 15 13:30:00 2006 +0000 |
|
125 | 127 | Wed Feb 01 13:00:30 2006 -0500 |
|
126 | 128 | Wed Feb 01 13:00:30 2006 +0000 |
|
127 | 129 | Sun Jan 15 13:30:00 2006 +0500 |
|
128 | 130 | Sun Jan 15 13:30:00 2006 -0800 |
|
129 | 131 | Sat Jul 15 13:30:00 2006 +0500 |
|
130 | 132 | Sat Jul 15 13:30:00 2006 -0700 |
|
131 | 133 | Sun Jun 11 00:26:40 2006 -0400 |
|
132 | 134 | Sat Apr 15 13:30:00 2006 +0200 |
|
133 | 135 | Sat Apr 15 13:30:00 2006 +0000 |
|
134 | 136 | Wed Feb 01 13:00:30 2006 -0500 |
|
135 | 137 | Wed Feb 01 13:00:30 2006 +0000 |
|
136 | 138 | Sun Jan 15 13:30:00 2006 +0500 |
|
137 | 139 | Sun Jan 15 13:30:00 2006 -0800 |
|
138 | 140 | Sat Jul 15 13:30:00 2006 +0500 |
|
139 | 141 | Sat Jul 15 13:30:00 2006 -0700 |
|
140 | 142 | Sun Jun 11 00:26:40 2006 -0400 |
|
141 | 143 | Sat Apr 15 13:30:00 2006 +0200 |
|
142 | 144 | Sat Apr 15 13:30:00 2006 +0000 |
|
143 | 145 | Wed Feb 01 13:00:30 2006 -0500 |
|
144 | 146 | Wed Feb 01 13:00:30 2006 +0000 |
General Comments 0
You need to be logged in to leave comments.
Login now