Re: How to insert "date" as timestamp

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <rwa(at)mosaic-ag(dot)com>
Cc: <aydin(dot)toprak(at)intengo(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: How to insert "date" as timestamp
Date: 2005-10-13 14:34:53
Message-ID: s34e2a4d.025@gwmta.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Do you "fall back" from daylight saving time to standard time
in the autumn? What happens to timestamps in the shift period?
Unless you use timestamp with time zone, you will have a range
of time when the timestamp is ambiguous -- data has been lost.
If it is lost before it gets to you, I guess there's not much you can
do to restore it, unless you have a steady enough stream of
transactions at the boundry to notice when the timestamps go
back by about an hour.

Personally, I would probably use the format which can accurately
record the values, in hopes that the source would someday stop
losing the information. It might save a table conversion later.

-Kevin

>>> Roland Walter <rwa(at)mosaic-ag(dot)com> 10/13/05 9:20 AM >>>
Kevin Grittner schrieb:

...
>
> I definitely would not use timestamp without time zone even
> within a single time zone unless that time zone didn't use
> daylight saving time, or I was very confident that I didn't need
> to record times in the wee hours on days when the time
> shifted. It's always safer to use timestamp with time zone
> when what you want to record is an instant in time.
>
> The only use case I've been able to think of where timestamp
> without time zone is semantically correct is where a publisher
> sets a release for, say, the next Harry Potter book. Having
> attended a late night book release party this summer so that
> my kids could pick up their book as soon as 12:01 a.m. rolled
> into our time zone, I can see at least one use case for this
> data type.
>

I have one. I get timestamps without timezone in a CSV-file
with exported data of transactions from a so called 'Clearing-Center'
that converts EDIFACT-Messages. This data gets imported into the
database of the system that creates the bills. I can not provide
information that I do not have. So there is no use for timestamps with
timezones.

Browse pgsql-jdbc by date

  From Date Subject
Next Message rafa 2005-10-13 15:35:08 log in Apache DBCP
Previous Message Kevin Grittner 2005-10-13 14:23:23 Re: How to insert "date" as timestamp