c# - Invariantly convert ET DST/STD to UTC -
i have logs had been written in et dst timezome, parsed them , wrote log utc time (date.touniversaltime().getdatetimeformats('g', cultureinfo.invariantculture)[0]
). (when standart time enabled) try run unit tests compare logs , face in issue times differ in hour.
is there way invariantly compare outputs without recreating logs.
instead of using pattern 'g' (general date time pattern) not include time zone information should @ using 'o' (round-trip date time pattern) preserve time zone information , structure string in such way easy sort on.
o: 6/15/2009 1:45:30 pm -> 2009-06-15t13:45:30.0900000 g: 6/15/2009 1:45:30 pm -> 6/15/2009 1:45:30 pm (en-us)
Comments
Post a Comment