Skip to content

Commit 98b36e7

Browse files
committed
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.
1 parent c3cbbdd commit 98b36e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/optional.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
# Check day-of-week and day of year computations
99
# (should trip an assert if this fails)
10-
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"))
10+
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"))
1111
null
12-
[2099,0,10,1,2,3,6,9]
12+
[2169,0,10,1,2,3,1,9]
1313

1414
# %e is not available on mingw/WIN32
1515
strftime("%A, %B %e, %Y")

0 commit comments

Comments
 (0)