Subject | RE: [firebird-support] How to convert TIMESTAMP to unix timestamp (number of seconds since epoch) |
---|---|
Author | Leyne, Sean |
Post date | 2009-06-10T20:54Z |
Lester,
Moving the item is not a simple mathematical operation of adding 7 days
to the current value but also adjusting the timezone portion of the
date/time based on the UTC offset will be for the same **time of day**
for the new date.
Consider:
Event time = "2009-03-11T10:00-05:00"
If this event is moved to March 18th, you would need to get the UTC
offset for 10:00am March 18 (March 18 is UTC-4, daylight saving).
So, the new meeting date/time will become
Event time = "2009-03-18T10:00-04:00"
expect the meeting time to maintain the **time of day** context.
Sean
> >> I agree but want to suggest that if it is necessary for ameeting
> >> system to commonly convert datetime values between timezones
> >> that storing the values as UTC is the only real solution.
> > ...
> >
> > My point is that if you store a timestamp including it's
> > time-zone you can have your cake and eat it too!
>
> NO
>
> If you store a meeting as 9AM British Summer Time, and then the
> gets moved to the following week - GMT - The there is no way oftelling
> from the ISO8901 timezone stamp that you need also to adjust an hour!Actually, you can.
Moving the item is not a simple mathematical operation of adding 7 days
to the current value but also adjusting the timezone portion of the
date/time based on the UTC offset will be for the same **time of day**
for the new date.
Consider:
Event time = "2009-03-11T10:00-05:00"
If this event is moved to March 18th, you would need to get the UTC
offset for 10:00am March 18 (March 18 is UTC-4, daylight saving).
So, the new meeting date/time will become
Event time = "2009-03-18T10:00-04:00"
> Saving ISO timestamps with a time is pointless unless you also knowthe
> location that relates to that timestamp.That really only matters if the daylight savings rules change and you
expect the meeting time to maintain the **time of day** context.
Sean