From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesse Scott <scotje@wwc.edu>
Cc: Postgresql SQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Timezone troubles
Date: Thu, 14 Aug 2003 07:26:46 -0400
Message-ID: <15437.1060860406@sss.pgh.pa.us> (raw)
In-Reply-To: <3F3B001B.8060506@wwc.edu>
References: <3F3B001B.8060506@wwc.edu>
Jesse Scott <scotje@wwc.edu> writes:
> lastlogin timestamp DEFAULT 'now',
> firstlogin timestamp,
> EXTRACT(EPOCH FROM lastlogin) AS lastlogin,
> EXTRACT(EPOCH FROM firstlogin) AS firstlogin,
Btw ... although you are hitting a bug in EXTRACT(), I think the above
is pretty foolish. Timestamp without time zone is inherently not a well
defined point in time --- its meaning depends on the eye of the
beholder, or at least the timezone the beholder lives in. Timestamp
with time zone is what you want for recording the true time of any
well-defined event. (Defaulting "timestamp" to mean "without time zone"
is one of the many bad decisions that have been forced on us by SQL spec
compliance.)
regards, tom lane
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: tgl@sss.pgh.pa.us, scotje@wwc.edu
Subject: Re: Timezone troubles
In-Reply-To: <15437.1060860406@sss.pgh.pa.us>
* 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