Re: Timezone troubles
От | Tom Lane |
---|---|
Тема | Re: Timezone troubles |
Дата | |
Msg-id | 15437.1060860406@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Timezone troubles (Jesse Scott <scotje@wwc.edu>) |
Список | 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 по дате отправления: