Try to make tests pass on systems with 32-bit time_t.

This commit is contained in:
Dianne Skoll
2025-05-06 12:20:59 -04:00
parent 7705278575
commit 416ee87dd0
2 changed files with 26 additions and 10 deletions

View File

@@ -3046,8 +3046,9 @@ DATETIME value.
.TP
.B $TimetIs64bit (read-only)
This variable returns 1 if the internal C \fBtime_t\fR type is at least
64 bits long. If it returns 0, then some astronomical functions such as
solstice and equinox calculations will fail after the year 2037.
64 bits long. If it returns 0, then the localtoutc and utctolocal functions
will fail after the year 2037, as may other functions that implicitly do
conversions between local time and UTC (such as astronomical functions.)
.TP
.B $UntimedFirst (read-only)
Set to 1 if the \fB\-g\fR option is used with a fourth sort character

View File

@@ -32,12 +32,27 @@ MSG June Equinox 2030 is [localtoutc(soleq(1,2030))] UTC
MSG September Solstice 2030 is [localtoutc(soleq(2,2030))] UTC
MSG December Equinox 2030 is [localtoutc(soleq(3,2030))] UTC
MSG March Solstice 2050 is [localtoutc(soleq(0,2050))] UTC
MSG June Equinox 2050 is [localtoutc(soleq(1,2050))] UTC
MSG September Solstice 2050 is [localtoutc(soleq(2,2050))] UTC
MSG December Equinox 2050 is [localtoutc(soleq(3,2050))] UTC
# The following fail unless time_t is 64-bits
# So on 32-bit systems, we simulate them to keep
# the test suite happy
if $TimetIs64bit
MSG March Solstice 2050 is [localtoutc(soleq(0,2050))] UTC
MSG June Equinox 2050 is [localtoutc(soleq(1,2050))] UTC
MSG September Solstice 2050 is [localtoutc(soleq(2,2050))] UTC
MSG December Equinox 2050 is [localtoutc(soleq(3,2050))] UTC
MSG Next March Solstice is [localtoutc(soleq(0))] UTC
MSG Next June Equinox is [localtoutc(soleq(1))] UTC
MSG Next September Solstice is [localtoutc(soleq(2))] UTC
MSG Next December Equinox is [localtoutc(soleq(3))] UTC
MSG Next March Solstice is [localtoutc(soleq(0))] UTC
MSG Next June Equinox is [localtoutc(soleq(1))] UTC
MSG Next September Solstice is [localtoutc(soleq(2))] UTC
MSG Next December Equinox is [localtoutc(soleq(3))] UTC
else
MSG March Solstice 2050 is 2050-03-20@10:21 UTC
MSG June Equinox 2050 is 2050-06-21@03:34 UTC
MSG September Solstice 2050 is 2050-09-22@19:29 UTC
MSG December Equinox 2050 is 2050-12-21@16:39 UTC
MSG Next March Solstice is 2045-03-20@05:08 UTC
MSG Next June Equinox is 2044-06-20@16:51 UTC
MSG Next September Solstice is 2044-09-22@08:49 UTC
MSG Next December Equinox is 2044-12-21@05:45 UTC
endif