BUG #1058: unexpected output when using timezone() and to_char()

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1058: unexpected output when using timezone() and to_char()
Date: 2004-01-21 15:39:10
Message-ID: 20040121153910.EA23CCF4910@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1058
Logged by: Blake Crosby

Email address: bcrosby(at)nm(dot)cbc(dot)ca

PostgreSQL version: 7.3.2

Operating system: FreeBSD 5.1-RELEASE-p11

Description: unexpected output when using timezone() and to_char()

Details:

select to_char(CURRENT_TIMESTAMP,'Day Mon DD YYYY HH24:MI:SS TZ');

returns:

to_char
------------------------------------
Wednesday Jan 21 2004 10:02:11 EST

however,

select to_char(timezone('PST',CURRENT_TIMESTAMP),' Day Mon DD YYYY
HH24:MI:SS TZ');

returns:

to_char
----------------------------------
Wednesday Jan 21 2004 07:07:44

Notice the Time zone field (specified by 'TZ' in the to_char) is missing
from the output.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Roman Avdeenko 2004-01-21 16:41:50 Readline lib configure error. Help
Previous Message Michael Meskes 2004-01-21 14:11:13 Re: BUG #1056: ecpg ignores WHENEVER NOT FOUND