It seems to me that you've left out a great deal of what you are trying to get.
Sorry, I'm looking to convert a GMT date/time group that is DST-less and in Zulu-time to the local date/time (several timezones east and potentially shifted another hour by DST). The data is coming from a service provider and we have no control over the format. The data is sent as ISO8601 DTG's like: YYYY-MM-DDThh:mm:ss-00:00 (The time zone offset is always 00:00) and a minimal character format: YYYYMMDDHHMMSS, depending whether the transaction is being passed real-time or as part of a batch mode data file. The sub-string access is easy, it's the timezone/DST translation that I'm looking to do "The Right Way".
At 12:13 +1100 2007/02/23, Boydell, Stuart wrote:
To answer to your question - storing the date/time as unix epoch ((milli)seconds from 1970-01-01T00:00Z) is probably the most convenient method of storing a pure timestamp, Combine that with locality information of an event and you can re-infer the local time the event occurred.
The original data is archived, it's just that for integration with the existing dataset, and reporting purposes, the date/time needs to be converted into internal format in local time.
So, in the case for one customer, if the timestamp received is 1am "today" it would actually need to be stored as 7am "yesterday" (up until DST kicks in) or 8am "yesterday" (after DST kicks in).
Ray -- .=====================================================================. | =-=-=-=-=-=-=-= Eagle Rock Information Systems Corp =-=-=-=-=-=-=-= | | -=-=-=-=-=-=-=- web and database business solutions -=-=-=-=-=-=-=- | | <http://www.eriscorp.com> <mailto:[EMAIL PROTECTED]> | |Midwest Regional Office: 626-535-9658x216 (voice) 626-628-3229 (eFax)| .=====================================================================. ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
