timezone - Windows GetTimeZoneInformation time difference doesn't match ISO web site or Google -


my pc windows 7 64-bit; i'm on u.s. east coast (eastern time); "date , time" applet -- reached right-clicking on taskbar clock , choosing "adjust date/time" -- labels time zone "(utc-05:00) eastern time (u.s. & canada)" , tells me daylight savings time ends in november. (for coming along later, written in april, after did "spring forward" daylight savings time.)

calling either windows gettimezoneinformation or getdynamictimezoneinformation apis (the latter available on vista or later) returns "bias" value of 300 minutes, 5 hours. (the bias value not negative because doc value says "utc = local time + bias".)

but if go iso web site claims show me time on computer displays time matches clock ends -0400. (i tried copy/paste it's difficult changes every second.) typing "current time utc" google shows time 4 (not 5) hours ahead of clock time here.

confusing me bit more -- have ec2 instance running windows server 2008 else set , said intentionally set gmt times recorded based on server clock wouldn't have 1-hour jumps caused daylight savings time.

when connect server, shows time 5 hours ahead of see here. date/time applet in control panel (different windows 7) shows current time zone "(gmt) greenwich mean time (dublin, edinburgh, lisbon, london)" there time zone "(gmt) coordinated universal time" -- utc -- , if change time zone (something think correct), offset 4 hours.

the "time zone settings" dialog on windows 7 (reached clicking "change time zone..." button on "date , time" applet discussed above) has time zones labelled "(utc) coordinated universal time" (4 hours now) , "(utc) dublin, edinburgh, lisbon, london" (5 hours now).

other thinking ec2 instance had time zone set wrong -- should have been set utc not london time accomplish goal stated above -- not further along in understanding this. windows 7 in u.s. says i'm 5 hours utc; else (including windows 2008 set utc time) says 4 hours.

so should routine produce iso-style timestamp trailing timezone offset? windows api tells me should -0500, else says should -0400. help!!

during eastern daylight time, offset indeed utc-04:00. list of display names time zones in windows not change reflect this. shows the standard offset, eastern standard time utc-05:00.

you correct server should set "(utc) coordinated universal time" , not setting labeled "(utc) dublin, edinburgh, lisbon, london". "coordinated universal time" setting permanently fixed @ utc, other has daylight offset utc+01:00 during british summer time. again, label showing standard offset, utc+00:00, shortened in display "(utc)".

the programming question asked:

so should routine produce iso-style timestamp trailing timezone offset?

this depends highly on language using. mentioned win32 apis getting system current time zone information, 1 call these directly. writing in c? c++? c#? vb? java? else? please answer , can answer question.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -