aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-03-04 08:44:36 +1100
committerSteve Bennett <steveb@workware.net.au>2020-03-04 08:44:36 +1100
commitf63172c57ad5810153e792f86aa20bf418a6a78d (patch)
tree6988c2b4401163d327952fdbc7b9fb724795e5a2 /tests
parent9a4982c17d02b0ab299e5d67cb7e2964bfe5ca44 (diff)
downloadjimtcl-f63172c57ad5810153e792f86aa20bf418a6a78d.zip
jimtcl-f63172c57ad5810153e792f86aa20bf418a6a78d.tar.gz
jimtcl-f63172c57ad5810153e792f86aa20bf418a6a78d.tar.bz2
clock: test and doc non-Y2038 compliance
Add a note in the documentation for clock that some systems use 32-bit time_t and are thus not year 2038 compliant. Also add a test to catch this in clock.test Reported-by: dbohdan <dbohdan@dbohdan.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 4e32df4..3e9aec3 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -51,4 +51,9 @@ test clock-4.1 {clock scan tests} clockscan {
clock scan {Sun Nov 04 03:02:46 AM 1990} -format {%a %b %d %I:%M:%S %p %Y} -gmt true
} 657687766
+# This will fail on systems that are not Y2038 compliant
+test clock-5.1 {Year 2038 compliance} {
+ clock format 2200000000 -format %Y-%m-%dT%H:%M:%S -gmt true
+} 2039-09-18T23:06:40
+
testreport