Re: Postgre 7.3.x Bug with datetime formatting.

From: "Safwan Hak" <safwan_hak(at)sympatico(dot)ca>
To: "'Safwan Hak'" <safwan_hak(at)sympatico(dot)ca>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Postgre 7.3.x Bug with datetime formatting.
Date: 2004-05-07 16:45:26
Message-ID: 20040507164526.DNDU11783.tomts22-srv.bellnexxia.net@Alexandra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

To Tom Lane,

SHOW TIMEZONE returns;

TimeZone

-----------

unknown

- PostgreSQL 7.3.4

- the box is linux. I'm not sure which version or how to find out. I'm
using my host's server.

Regards,

Safwan

_____

From: Safwan Hak [mailto:safwan_hak(at)sympatico(dot)ca]
Sent: Friday, May 07, 2004 10:53 AM
To: 'pgsql-bugs(at)postgresql(dot)org'
Subject: RE: Postgre 7.3.x Bug with datetime formatting.

To Tom Lane( when I replied to you, your mail server gave error return
address was refused.)

Here is my response to your email of Friday May, 07.

--

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(dot)pa(dot)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:

> 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

_____

From: Safwan Hak [mailto:safwan_hak(at)sympatico(dot)ca]
Sent: Wednesday, May 05, 2004 1:30 PM
To: 'pgsql-bugs(at)postgresql(dot)org'
Subject: Postgre 7.3.x Bug with datetime formatting.

Hi,

There is a problem with the to_char function when it formats the timestamp;
in the example below; The HH is different between both calls.

select current_timestamp, to_char(current_timestamp, 'YYYY-MM-DD
HH:MM:SS:US')

returns

timestamptz to_char

--------------------------
--------------------------

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

Regards,

Safwan

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2004-05-07 20:32:50 Re: [BUGS] BUG #1148: server restarts depending on stats options
Previous Message Safwan Hak 2004-05-07 15:53:20 Re: Postgre 7.3.x Bug with datetime formatting.