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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bcrosby(at)nm(dot)cbc(dot)ca
Cc: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1058: unexpected output when using timezone() and to_char()
Date: 2004-01-21 17:18:42
Message-ID: 1674.1074705522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> however,
> select to_char(timezone('PST',CURRENT_TIMESTAMP),' Day Mon DD YYYY
> HH24:MI:SS TZ');
> returns:

> Wednesday Jan 21 2004 07:07:44

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

This isn't a bug. The timezone() function returns datatype timestamp
without time zone, so there is nothing that to_char could usefully
print.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ruff 2004-01-21 18:57:48 Re: 7.3.5 initdb failure on Irix 6.5.18
Previous Message Roman Avdeenko 2004-01-21 16:41:50 Readline lib configure error. Help