From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: kenzoid@io.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Timezone issue with date_part
Date: Sat, 2 Nov 2002 13:21:44 -0800
Message-ID: <200211021321.44211.josh@agliodbs.com> (raw)
In-Reply-To: <20169.1036246634@sss.pgh.pa.us>
References: <20021102065654.GA8564@roark.kenzoid.com>
<20169.1036246634@sss.pgh.pa.us>
Tom,
> (IMHO, the SQL spec is really brain-dead to define timestamp without
> time zone as the default form of timestamp; the variant with time zone
> is much more useful for most applications. It's far too easy to shoot
> yourself in the foot when working with zoneless timestamps --- usually
> in a way that you won't notice until daylight-savings transition time
> comes around, or you roll out the app to users in other time zones.)
It's pretty easy to shoot yourself in the foot with time zones, as well. For
example, most people are thrown off by the daylight-savings-time shift in
date calculations; for example:
select '2002-10-20 00:00:00 PDT'::TIMESTAMPTZ + '2 weeks'::INTERVAL
jwnet-> ;
?column?
------------------------
2002-11-02 23:00:00-08
This sort of behavior can really muck with calendar applications. Of course,
it could be solved with a DAY/WEEK subtype, but I've already advocated for
that.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us, kenzoid@io.com
Subject: Re: Timezone issue with date_part
In-Reply-To: <200211021321.44211.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox