changeset 6236:ad6b123de1c7

Add tests for the fixes to issue1014 (fractional timezones)
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 12 Mar 2008 22:20:10 +0100
parents d16798000be0
children 4a85a9077136 39cfcef4f463
files tests/test-parse-date tests/test-parse-date.out
diffstat 2 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-parse-date	Wed Mar 12 09:04:20 2008 +0100
+++ b/tests/test-parse-date	Wed Mar 12 22:20:10 2008 +0100
@@ -32,3 +32,14 @@
 echo "d" > a
 hg ci -d "2006-01-15 13:30 +0500" -m "winter@UTC+5"
 hg log --template '{date|date}\n'
+
+# Test issue1014 (fractional timezones)
+hg debugdate "1000000000 -16200" # 0430
+hg debugdate "1000000000 -15300" # 0415
+hg debugdate "1000000000 -14400" # 0400
+hg debugdate "1000000000 0"      # GMT
+hg debugdate "1000000000 14400"  # -0400
+hg debugdate "1000000000 15300"  # -0415
+hg debugdate "1000000000 16200"  # -0430
+hg debugdate "Sat Sep 08 21:16:40 2001 +0430"
+hg debugdate "Sat Sep 08 21:16:40 2001 -0430"
--- a/tests/test-parse-date.out	Wed Mar 12 09:04:20 2008 +0100
+++ b/tests/test-parse-date.out	Wed Mar 12 22:20:10 2008 +0100
@@ -15,3 +15,21 @@
 Sat Apr 15 13:30:00 2006 +0000
 Wed Feb 01 13:00:30 2006 -0500
 Wed Feb 01 13:00:30 2006 +0000
+internal: 1000000000 -16200
+standard: Sun Sep 09 06:16:40 2001 +0430
+internal: 1000000000 -15300
+standard: Sun Sep 09 06:01:40 2001 +0415
+internal: 1000000000 -14400
+standard: Sun Sep 09 05:46:40 2001 +0400
+internal: 1000000000 0
+standard: Sun Sep 09 01:46:40 2001 +0000
+internal: 1000000000 14400
+standard: Sat Sep 08 21:46:40 2001 -0400
+internal: 1000000000 15300
+standard: Sat Sep 08 21:31:40 2001 -0415
+internal: 1000000000 16200
+standard: Sat Sep 08 21:16:40 2001 -0430
+internal: 999967600 -16200
+standard: Sat Sep 08 21:16:40 2001 +0430
+internal: 1000000000 16200
+standard: Sat Sep 08 21:16:40 2001 -0430