ffi/unsafe/com: convert to date*, document limitations

Merge to v6.1 along with 7d65ee6127.
(cherry picked from commit 689f449c8d)
This commit is contained in:
Matthew Flatt 2014-07-12 08:10:22 +01:00 committed by Ryan Culpepper
parent 1962da8587
commit dd6f973d5c
2 changed files with 15 additions and 11 deletions

View File

@ -449,7 +449,9 @@ used to represent various atomic types:
@item{@racket['string] --- a string}
@item{@racket['date] --- a @racket[date] or @racket[date*]}
@item{@racket['date] --- a @racket[date] or @racket[date*]; when converting to
a @racket[date*], the timezone is reported as @racket["UTC"] and the
@racket[year-day] field is @racket[0]}
@item{@racket['com-object] --- a @tech{COM object} as in @racket[com-object?]}

View File

@ -1447,7 +1447,7 @@
(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"))
(date (SYSTEMTIME-wSecond s)
(date* (SYSTEMTIME-wSecond s)
(SYSTEMTIME-wMinute s)
(SYSTEMTIME-wHour s)
(SYSTEMTIME-wDay s)
@ -1456,7 +1456,9 @@
(SYSTEMTIME-wDayOfWeek s)
0
#f
0))))
0
(* 1000 (SYSTEMTIME-wMilliseconds s))
"UTC"))))
(define _currency
(make-ctype _CY