Conversion of MS Date received via Com/Automation - To whom it may concern
Hi All,
if I got things right, LispWorks Com/Automation does no conversion on Date values received from a call. 'COM/Automation User Guide
and Reference Manual' explictely says in '3.3.3 Data conversion when calling Automation methods': DATE, VT_DATE - not supported.
So we simply obtain a double-float value. I hacked a function which converts this float into universal-time, so we can use
decode-universal-time:
(defun uni (ms-time)
"Convert Microsoft Datetime value received via LispWorks COM/Automation
interface into universal-time."
(multiple-value-bind (q r) (floor ms-time)
(+ (- (* (- q 2) 86400) 3600) (round (* r 86400)))))
A few tests did not reveal any errors.
Andreas
(Rem: I currently needs this to read MS Outlook Calendar entries)