1 USING: calendar namespaces alien.c-types system windows
2 windows.kernel32 kernel math combinators ;
5 M: windows gmt-offset ( -- hours minutes seconds )
6 "TIME_ZONE_INFORMATION" <c-object>
7 dup GetTimeZoneInformation {
8 { TIME_ZONE_ID_INVALID [ win32-error-string throw ] }
9 { TIME_ZONE_ID_UNKNOWN [ TIME_ZONE_INFORMATION-Bias ] }
10 { TIME_ZONE_ID_STANDARD [ TIME_ZONE_INFORMATION-Bias ] }
11 { TIME_ZONE_ID_DAYLIGHT [
12 [ TIME_ZONE_INFORMATION-Bias ]
13 [ TIME_ZONE_INFORMATION-DaylightBias ] bi +
15 } case neg 60 /mod 0 ;