Fix _date to allow dates before 1970 year

This commit is contained in:
Kalimehtar 2014-07-11 16:42:09 +06:00 committed by Matthew Flatt
parent 8f9903ba58
commit 7d65ee6127

View File

@ -1447,13 +1447,16 @@
(define s (make-SYSTEMTIME 0 0 0 0 0 0 0 0))
(unless (not (zero? (VariantTimeToSystemTime d s)))
(error 'date "error converting date from COM date"))
(seconds->date
(find-seconds (SYSTEMTIME-wSecond s)
(SYSTEMTIME-wMinute s)
(SYSTEMTIME-wHour s)
(SYSTEMTIME-wDay s)
(SYSTEMTIME-wMonth s)
(SYSTEMTIME-wYear s))))))
(date (SYSTEMTIME-wSecond s)
(SYSTEMTIME-wMinute s)
(SYSTEMTIME-wHour s)
(SYSTEMTIME-wDay s)
(SYSTEMTIME-wMonth s)
(SYSTEMTIME-wYear s)
(SYSTEMTIME-wDayOfWeek s)
0
#f
0))))
(define _currency
(make-ctype _CY