summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-03-14 21:41:31 (GMT)
committersebres <sebres@users.sourceforge.net>2024-03-14 21:41:31 (GMT)
commit627f79fd04267ca820548d5185c9195f68ab7a9f (patch)
treee7f4c4d2578e6262ba0f7b02c6cb146108213f6c /tests/clock.test
parent8ca8455da2ad0d3e75065b82426ed3439fcf59c9 (diff)
downloadtcl-627f79fd04267ca820548d5185c9195f68ab7a9f.zip
tcl-627f79fd04267ca820548d5185c9195f68ab7a9f.tar.gz
tcl-627f79fd04267ca820548d5185c9195f68ab7a9f.tar.bz2
make clock tests system-TZ independent
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test22
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 5fbef7b..bd38cc1 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -36311,27 +36311,27 @@ test clock-34.18.5 {clock scan, ISO 8601 extended date time with UTC TZ} {
} "Oct 23, 1992 00:00:00"
test clock-34.20.1 {clock scan tests (-TZ)} {
- set time [clock scan "31 Jan 14 23:59:59 -0100"]
+ set time [clock scan "31 Jan 14 23:59:59 -0100" -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Feb 01,2014 00:59:59 GMT}
test clock-34.20.2 {clock scan tests (+TZ)} {
- set time [clock scan "31 Jan 14 23:59:59 +0100"]
+ set time [clock scan "31 Jan 14 23:59:59 +0100" -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 31,2014 22:59:59 GMT}
test clock-34.20.3 {clock scan tests (-TZ)} {
- set time [clock scan "23:59:59 -0100" -base 0]
+ set time [clock scan "23:59:59 -0100" -base 0 -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 02,1970 00:59:59 GMT}
test clock-34.20.4 {clock scan tests (+TZ)} {
- set time [clock scan "23:59:59 +0100" -base 0]
+ set time [clock scan "23:59:59 +0100" -base 0 -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 01,1970 22:59:59 GMT}
test clock-34.20.5 {clock scan tests (TZ)} {
- set time [clock scan "Mon, 30 Jun 2014 23:59:59 CEST"]
+ set time [clock scan "Mon, 30 Jun 2014 23:59:59 CEST" -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jun 30,2014 21:59:59 GMT}
test clock-34.20.6 {clock scan tests (TZ)} {
- set time [clock scan "Fri, 31 Jan 2014 23:59:59 CET"]
+ set time [clock scan "Fri, 31 Jan 2014 23:59:59 CET" -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 31,2014 22:59:59 GMT}
test clock-34.20.7 {clock scan tests (relspec, day unit not TZ)} {
@@ -36343,11 +36343,11 @@ test clock-34.20.8 {clock scan tests (relspec, day unit not TZ)} {
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 09,1970 23:59:59 GMT}
test clock-34.20.9 {clock scan tests (merid and TZ)} {
- set time [clock scan "10:59 pm CET" -base 2000000]
+ set time [clock scan "10:59 pm CET" -base 2000000 -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 24,1970 21:59:00 GMT}
test clock-34.20.10 {clock scan tests (merid and TZ)} {
- set time [clock scan "10:59 pm +0100" -base 2000000]
+ set time [clock scan "10:59 pm +0100" -base 2000000 -gmt true]
clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
} {Jan 24,1970 21:59:00 GMT}
test clock-34.20.11 {clock scan tests (complex TZ)} {
@@ -36403,6 +36403,12 @@ test clock-34.20.19 {clock scan tests (no TZ)} {
test clock-34.20.20 {clock scan tests (TZ, TZ + 1day)} {
clock scan "00:00 GMT+1000 day" -base 100000000 -gmt 1
} 100015200
+test clock-34.20.21 {clock scan tests (local date of base depends on given TZ, time apllied to different day)} {
+ list [clock scan "23:59:59 -0100" -base 0 -timezone :CET] \
+ [clock scan "23:59:59 -0100" -base 0 -gmt 1] \
+ [clock scan "23:59:59 -0100" -base 0 -timezone -1400] \
+ [clock scan "23:59:59 -0100" -base 0 -timezone :Pacific/Apia]
+} {89999 89999 3599 3599}
# CLOCK SCAN REAL TESTS