ffi/unsafe/com: convert to date*
, document limitations
Merge to v6.1 along with7d65ee6127
. (cherry picked from commit689f449c8d
)
This commit is contained in:
parent
1962da8587
commit
dd6f973d5c
|
@ -449,7 +449,9 @@ used to represent various atomic types:
|
||||||
|
|
||||||
@item{@racket['string] --- a string}
|
@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?]}
|
@item{@racket['com-object] --- a @tech{COM object} as in @racket[com-object?]}
|
||||||
|
|
||||||
|
|
|
@ -1447,16 +1447,18 @@
|
||||||
(define s (make-SYSTEMTIME 0 0 0 0 0 0 0 0))
|
(define s (make-SYSTEMTIME 0 0 0 0 0 0 0 0))
|
||||||
(unless (not (zero? (VariantTimeToSystemTime d s)))
|
(unless (not (zero? (VariantTimeToSystemTime d s)))
|
||||||
(error 'date "error converting date from COM date"))
|
(error 'date "error converting date from COM date"))
|
||||||
(date (SYSTEMTIME-wSecond s)
|
(date* (SYSTEMTIME-wSecond s)
|
||||||
(SYSTEMTIME-wMinute s)
|
(SYSTEMTIME-wMinute s)
|
||||||
(SYSTEMTIME-wHour s)
|
(SYSTEMTIME-wHour s)
|
||||||
(SYSTEMTIME-wDay s)
|
(SYSTEMTIME-wDay s)
|
||||||
(SYSTEMTIME-wMonth s)
|
(SYSTEMTIME-wMonth s)
|
||||||
(SYSTEMTIME-wYear s)
|
(SYSTEMTIME-wYear s)
|
||||||
(SYSTEMTIME-wDayOfWeek s)
|
(SYSTEMTIME-wDayOfWeek s)
|
||||||
0
|
0
|
||||||
#f
|
#f
|
||||||
0))))
|
0
|
||||||
|
(* 1000 (SYSTEMTIME-wMilliseconds s))
|
||||||
|
"UTC"))))
|
||||||
|
|
||||||
(define _currency
|
(define _currency
|
||||||
(make-ctype _CY
|
(make-ctype _CY
|
||||||
|
|
Loading…
Reference in New Issue
Block a user