Tom,
> How so? If you think that the timestamp-without-zone is relative to GMT
> rather than your local zone, you say something like
> extract(epoch from (timestampvar AT TIME ZONE 'GMT'))
Ah, that didn't seem to work before. I must have done the parens wrong.
> Quite honestly, you shoul
Josh Berkus writes:
> The problem with the current functionality is that it makes it impossible to
> get a GMT Unix timestamp out of a TIMESTAMP WITHOUT TIME ZONE without string
> manipulation.
How so? If you think that the timestamp-without-zone is relative to GMT
rather than your local zone,
Tom,
> I don't believe there is anything wrong here. extract(epoch) is defined
> to produce the equivalent Unix timestamp, and that's what it's doing.
> See the thread at
> http://archives.postgresql.org/pgsql-bugs/2003-02/msg00069.php
Darn. I missed that discussion, I'd have argued with Thomas
Josh Berkus writes:
> Summary: "epoch" does not produce a consistent behavior when cast as
> TIMESTAMP WITHOUT TIMEZONE
I don't believe there is anything wrong here. extract(epoch) is defined
to produce the equivalent Unix timestamp, and that's what it's doing.
See the thread at
http://archive
Summary: "epoch" does not produce a consistent behavior when cast as
TIMESTAMP WITHOUT TIMEZONE
Severity: Annoyance
Tested On: 7.4.6, 8.0b4
Example:
test=> select extract(epoch from '2004-12-01 00:00'::TIMESTAMP WITHOUT TIME
ZONE);
date_part
1101888000
this value is actually l