Displaying 1 result from an estimated 1 matches for "time_zone_information".
2007 Oct 14
2
GetTimeZoneInformation question
...Bias, StandardName and DaylightName, but everything else is goofed
up. The alignment seems ok, but maybe I''ve missed something or maybe I
have to do extra work to unpack the SYSTEMTIME structures.
require ''windows/time''
include Windows::Time
buf = 0.chr * 172 # sizeof(TIME_ZONE_INFORMATION)
GetTimeZoneInformation(buf)
p buf[0,4].unpack(''L'')[0] # Bias
p buf[4,64].tr("\0",'''') # StandardName
p buf[68,2].unpack(''S'')[0] # Year
p buf[70,2].unpack(''S'')[0] # Month
p buf[72,2].unpack(''S'...