-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIXED: Windows format_time/3 implementation for time stamps > 32 bits.
While the Windows `time_t` is 64 bits, it doesn't seem to localtime() seems broken handling large time offsets.
- Loading branch information
1 parent
91ad94b
commit d4b8911
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
Author: Jan Wielemaker | ||
E-mail: [email protected] | ||
WWW: www.swi-prolog.org | ||
Copyright (c) 2006-2021, University of Amsterdam | ||
Copyright (c) 2006-2024, University of Amsterdam | ||
VU University Amsterdam | ||
SWI-Prolog Solutions b.v. | ||
All rights reserved. | ||
|
@@ -225,6 +225,10 @@ | |
parse_time('2006-W49-5', iso_8601, T). | ||
test(iso_8601, T =:= 1165536000) :- | ||
parse_time('2006-342', iso_8601, T). | ||
test(iso_8601, S == '1732-02-22') :- | ||
parse_time('1732-02-22', iso_8601, Stamp), | ||
assertion(Stamp =:= -7506086400), | ||
format_time(atom(S), '%Y-%m-%d', Stamp). | ||
|
||
:- end_tests(parse_time). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters