My topic is probably terribly worded, but here's what I have.
I have a web service that reports timestamps in its local time, and the timestamps reflect daylight hours if the server is in a vulnerable region. The web service also has a second call to get the server time in UTC, so the server in Pacific Daylight Time (PDT) reports its UTC offset as -08: 00, although it is effectively -07: 00 due to PDT.
Here is the result of my call to return the server time zone information.
PST; -480; (UTC-08: 00) Pacific Time (US and Canada), Pacific Standard Time, Pacific Daylight Saving, [01: 01: 0001; 12: 31: 2006; 60 ;; 02: 00: 00; 4; 1; 0;]; [0; 02: 00: 00; ten; 5; 0;];] [01: 01: 2007; 12: 31: 9999; 60; [0; 02: 00: 00; 3; 2; 0;]; [0; 02: 00: 00; eleven; 1; 0;];];
So, if the time stamp returned by the web service is 3/12/2013 12:00, and the UTC offset is -08: 00, and I live in the Arizona daylight saving zone, where my UTC offset is -07: 00 How can I convert from a returned timestamp to my local time?
Killer here is a web service that uses local time in timestamps. If they simply adhered to a universal format, my life would be easy. My current thinking is that if I can get the server information in TTimeZone or equivalent structure, then I can use the TTimeZone.IsDaylightTime (Timestamp) function to find out if I need to subtract the hour from the timestamp before using the server - 08:00 offset and -07: 00 local offset to get the correct local time.
source share