summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Langford <wlangfor@gmail.com>2017-11-27 22:57:50 -0500
committerWilliam Langford <wlangfor@gmail.com>2017-11-27 22:57:50 -0500
commit98b36e74b8174da6656a916f512c4d3cfa915768 (patch)
treee0aa1686b0befc5ffe0a0e952e30a2c89d640e5f
parentc3cbbdd8a201aafdc379aa5cd4bc9608541af468 (diff)
Fix strptime tests on macOS 10.12
Dates in 1900 are before the Unix epoch. We shouldn't make any promises about how well they are supported, especially given that our time support is a thin wrapper over the libc functions. This changes the test to use dates after the epoch, which should fit within both a signed and an unsigned 32-bit time_t.
-rw-r--r--tests/optional.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/optional.test b/tests/optional.test
index 8e739d5d..6847ebe5 100644
--- a/tests/optional.test
+++ b/tests/optional.test
@@ -7,9 +7,9 @@
# Check day-of-week and day of year computations
# (should trip an assert if this fails)
-last(range(365 * 199)|("1900-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime) + (86400 * .)|strftime("%Y-%m-%dT%H:%M:%SZ")|strptime("%Y-%m-%dT%H:%M:%SZ"))
+last(range(365 * 199)|("1970-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime) + (86400 * .)|strftime("%Y-%m-%dT%H:%M:%SZ")|strptime("%Y-%m-%dT%H:%M:%SZ"))
null
-[2099,0,10,1,2,3,6,9]
+[2169,0,10,1,2,3,1,9]
# %e is not available on mingw/WIN32
strftime("%A, %B %e, %Y")