Gustav Brock
Gustav at cactus.dk
Tue Oct 25 02:56:20 CDT 2011
Hi Ken There are two methods. One is to convert any time recorded to UTC before storing it. Then everything is "normalised", and times can be directly compared. The other is to record the time as local time including (most likely in a separate field) the current offset (including a DST value) between local time and UTC. Then local time can be directly compared, and time can easily be converted to compare with time of UTC or other time zones. Some of the latest database engines can store date/time including an offset from UTC in a single field. /gustav >>> kvanhuss at airrsystem.com 25-10-2011 05:13 >>> I have an unmet challenge relating to comparing times in different time zones. User on the other side of the world, literally enters time of an event. When the user saves the record in the database that time is captured, though the time is the server time, located in US central time zone. Using UTC offset I have "normalized" the times to UTC to compare against one another to ensure the record was entered within a certain amount of time. The challenge I see down the road is Day Light Savings time and the impact that will have on the offset. Anyone experience this before? Thanks! Ken