timezone() with timeofday() converts the wrong direction?

From: "Steve - DND" <postgres(at)digitalnothing(dot)com>
To: "postgres-general" <pgsql-general(at)postgresql(dot)org>
Subject: timezone() with timeofday() converts the wrong direction?
Date: 2005-04-21 20:35:16
Message-ID: LDEHKBBOEMIJKHKBOFNFKEGENGAA.postgres@digitalnothing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

These attempts were run at 4/21/2005 13:15:00 -07.
UTC: 4/21/2005 20:15:00

SELECT timeofday()::timestamp
04/21/2005 13:15:00

SELECT timezone('UTC', now())
04/21/2005 20:15:00 PM

SELECT timezone('UTC', timeofday()::timestamp)::timestamp without time zone
04/21/2005 06:15:00 <- What the heck is this?!

Why does the conversion to UTC using timeofday() go wrong? It seems like the
conversion went 7 hours in the wrong direction. Did I forget a parameter or
switch somewhere?

Thanks,
Steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-04-21 21:09:43 Re: Filesystem options for storing pg_data
Previous Message Marco Colombo 2005-04-21 19:59:29 Re: Filesystem options for storing pg_data