Re: Postgre 7.3.x Bug with datetime formatting. - Mailing list pgsql-bugs

From Safwan Hak
Subject Re: Postgre 7.3.x Bug with datetime formatting.
Date
Msg-id 20040507140405.ZIUV17358.tomts25-srv.bellnexxia.net@Alexandra
Whole thread Raw
In response to Re: Postgre 7.3.x Bug with datetime formatting.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Postgre 7.3.x Bug with datetime formatting.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I did realize my mistake regarding the time. But the hours is still wrong.
Here is the call as per change.  The result still shows a variation.

-----
select current_timestamp, to_char(current_timestamp, 'YYYY-MM-DD
HH24:MI:SS')

timestamptz                     to_char
 --------------------------      -------------------
 2004-05-07 08:59:24.713109      2004-05-07 07:59:24
-----

I'm new to Postgre; is it possible to set the timezone or clock of Postgre
different from local machine;  I didn't setup the machines; but if you tell
me how to get you the settings for postgre, as well as the local or timezone
settings for the machine, we might be able to figure out the discrepancy.
As you see in the result above, the hours is still incorrect.

Regards,
Safwan

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, May 06, 2004 8:17 PM
To: Safwan Hak
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Postgre 7.3.x Bug with datetime formatting.

"Safwan Hak" <safwan_hak@sympatico.ca> writes:
> select current_timestamp, to_char(current_timestamp, 'YYYY-MM-DD
> HH:MM:SS:US')

>  2004-05-05 13:25:12.332313                  2004-05-05 12:05:12:332313

Looks fine to me.  I suspect what you are wanting is HH24:MI:SS, not
HH:MM:SS.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Kris Jurka
Date:
Subject: Re: PostgreSQL 7.4.1 JDBC driver bug
Next
From: Tom Lane
Date:
Subject: Re: Postgre 7.3.x Bug with datetime formatting.