From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Randall Nortman <postgreslists(at)wonderclown(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Daylight Savings Time handling on persistent connections |
Date: | 2004-10-31 21:14:52 |
Message-ID: | 1491.1099257292@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Randall Nortman <postgreslists(at)wonderclown(dot)com> writes:
> On Sun, Oct 31, 2004 at 02:44:51PM -0500, Tom Lane wrote:
>> Actually, the intended and documented behavior is that it should
>> interpret an ambiguous time as local standard time (e.g., EST not EDT).
> I'm finding it hard to see how either way is likely to generate good
> results in *any* application, much less in a majority of applications.
> So in a way, perhaps the most correct thing to do would be to spit out
> an error if the timestamp is ambiguous. Any application which deals
> with timestamps in anything other than UTC should really be handling
> the disambiguation itself, because the server can't possibly know what
> the application means to do. Not generating an error is likely to
> allow an application bug to go unnoticed, especially if the database
> does not have a unique constraint on timestamps (as mine does).
That line of argument leads directly to the conclusion that we shouldn't
allow timezone-less input strings at all, since it's unlikely that
anyone would code their app to append a timezone spec only during the
two hours a year when it actually matters. And wouldn't you rather have
had the problem pointed out immediately on testing the app, rather than
waiting till 1AM on a fall Sunday morning to find out it's broken?
However, I am not prepared to buy into requiring explicit TZ specs
always... it's just too much of a PITA.
For human users, there would be some value in acting this way, since
it would serve to remind them of the issue only when it actually
matters. Comments anyone?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2004-10-31 22:02:58 | Re: Interpolation of environment variables in SQL at runtime? |
Previous Message | Randall Nortman | 2004-10-31 20:29:50 | Re: Daylight Savings Time handling on persistent connections |