Subject Re: [firebird-support] How to convert TIMESTAMP to unix timestamp (number of seconds since epoch)
Author Geoff Worboys
Lester Caine wrote:
>> My point is that if you store a timestamp including it's
>> time-zone you can have your cake and eat it too!

> NO
...
> Saving ISO timestamps with a time is pointless unless you
> also know the location that relates to that timestamp.

Anything you can do with a normalised UTC timestamp you can
also do with an ISO timestamp. The reverse is NOT true.

The reason is simple: With an ISO timestamp that includes the
time-zone you can re-calculate UTC anytime you need it. With
only a UTC timestamp the original time-zone detail is lost and
cannot be regained.


There is an element of truth to also needing the location to
make good use of time-zone detail... at least for some
applications. However I can give you two examples where just
having the time-zone adds meaning:

. A photo of the sun on the horizon, location unknown.
Is it sunrise or sunset?

. When I am conversing with someone by email I often
reveal the RFC822 headers to see what time-of-day is
happens to be where they are. Whether it is getting
late or whatever. I may even know their location but
cannot be bothered looking on the relative time-zones
and whether it is daylight savings there etc.

In either of these two situations an already normalised to
UTC timestamp cannot help me, the real "time-of-day" detail
is already lost. Whereas a timestamp that has preserved the
original time-zone offset (ISO8601) is ideal, it tells me
BOTH the time-of-day at the source AND how to convert that
time to UTC if necessary.

--
Geoff Worboys
Telesis Computing