Re: Timezone troubles - Mailing list pgsql-sql

From Tom Lane
Subject Re: Timezone troubles
Date
Msg-id 15437.1060860406@sss.pgh.pa.us
Whole thread Raw
In response to Timezone troubles  (Jesse Scott <scotje@wwc.edu>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timezone troubles
Next
From: Bruno Wolff III
Date:
Subject: Re: independent sequence for each month