Re: Bug in function to_char() !!

From: "Najib Abi Fadel" <nabifadel(at)usj(dot)edu(dot)lb>
To: "generalpost" <pgsql-general(at)postgresql(dot)org>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Bug in function to_char() !!
Date: 2004-07-05 12:18:12
Message-ID: 006201c4628a$29e997c0$f664a8c0@najib
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


[root(at)STIsrv root]# uname -a
Linux STIsrv 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
GNU/Linux

[root(at)STIsrv root]# date
Mon Jul 5 13:22:55 EEST 2004

I tried to change the timezone (using timeconfig) i have always:

dragon_devel=# SELECT to_char('2005-03-27'::date,'DD/MM/YY');
to_char
----------
26/03/05
(1 row)

NOTE THAT IF I USE TIMESTAMP IT WORKS::
dragon_devel=# SELECT to_char('2005-03-27'::timestamp,'DD/MM/YY');
to_char
----------
27/03/05
(1 row)

i am using Red HAt 8.0

I have tried the same command on 2 different servers (same postgres version)

dragon_devel=# SELECT version();
version
----------------------------------------------------------------------------
-----------------------------
PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
20020903 (Red Hat Linux 8.0 3.2-7)
(1 row)

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Najib Abi Fadel" <nabifadel(at)usj(dot)edu(dot)lb>
Cc: "generalpost" <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, July 01, 2004 4:52 PM
Subject: Re: [GENERAL] Bug in function to_char() !!

> "Najib Abi Fadel" <nabifadel(at)usj(dot)edu(dot)lb> writes:
> > SELECT to_char('2005-03-27'::date,'DD/MM/YYYY');
> > to_char
> > ------------
> > 26/03/2005
> > (1 row)
>
> What timezone setting are you using, and what kind of system is this on?
> I suppose that day is a daylight-savings transition day for you, but no
> one else is likely to reproduce the problem in a different zone ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kazuya Togashi 2004-07-05 12:21:35 Difference in text/char data matching between 7.3.4 & 7.4.2
Previous Message Richard Huxton 2004-07-05 12:16:23 Re: creating a complex aggregate function