dbTalk Databases Forums  

Re: [BUGS] Postgre 7.3.x Bug with datetime formatting.

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Postgre 7.3.x Bug with datetime formatting. in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Postgre 7.3.x Bug with datetime formatting. - 05-06-2004 , 08:25 PM






"Safwan Hak" <safwan_hak (AT) sympatico (DOT) ca> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #2  
Old   
Safwan Hak
 
Posts: n/a

Default Re: [BUGS] Postgre 7.3.x Bug with datetime formatting. - 05-07-2004 , 09:21 AM






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 (AT) sss (DOT) pgh.pa.us]
Sent: Thursday, May 06, 2004 8:17 PM
To: Safwan Hak
Cc: pgsql-bugs (AT) postgresql (DOT) org
Subject: Re: [BUGS] Postgre 7.3.x Bug with datetime formatting.

"Safwan Hak" <safwan_hak (AT) sympatico (DOT) ca> writes:
Quote:
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


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Postgre 7.3.x Bug with datetime formatting. - 05-07-2004 , 10:47 AM



"Safwan Hak" <safwan_hak (AT) sympatico (DOT) ca> writes:
Quote:
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
Hm, that is odd. What timezone are you running under? (The output of
SHOW TIMEZONE would be interesting.) Also, exactly which Postgres
version is this, and on what platform?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.