factor/basis/calendar/windows/windows.factor

16 lines
607 B
Factor
Raw Normal View History

2008-09-01 12:48:22 -04:00
USING: calendar namespaces alien.c-types system windows
windows.kernel32 kernel math combinators ;
2007-09-20 18:09:08 -04:00
IN: calendar.windows
2008-04-02 19:28:55 -04:00
M: windows gmt-offset ( -- hours minutes seconds )
2008-03-18 19:59:37 -04:00
"TIME_ZONE_INFORMATION" <c-object>
dup GetTimeZoneInformation {
2008-04-11 15:25:37 -04:00
{ TIME_ZONE_ID_INVALID [ win32-error-string throw ] }
{ TIME_ZONE_ID_UNKNOWN [ TIME_ZONE_INFORMATION-Bias ] }
{ TIME_ZONE_ID_STANDARD [ TIME_ZONE_INFORMATION-Bias ] }
{ TIME_ZONE_ID_DAYLIGHT [
2008-03-18 19:59:37 -04:00
[ TIME_ZONE_INFORMATION-Bias ]
[ TIME_ZONE_INFORMATION-DaylightBias ] bi +
] }
2008-04-11 13:55:57 -04:00
} case neg 60 /mod 0 ;