Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id CBF1947589A for ; Sun, 19 May 2002 22:37:31 -0400 (EDT) Received: from smtp-3.ig.com.br (unknown [200.226.132.152]) by postgresql.org (Postfix) with SMTP id 9AF79475897 for ; Sun, 19 May 2002 22:37:28 -0400 (EDT) Received: (qmail 9236 invoked from network); 20 May 2002 02:37:13 -0000 Received: from shasta163127.ig.com.br (HELO ignis) (200.151.163.127) by smtp-3.ig.com.br with SMTP; 20 May 2002 02:37:13 -0000 From: "Edipo E. F. Melo" To: "pgsql-sql" Date: Sun, 19 May 2002 17:43:21 -0300 Reply-To: "Edipo E. F. Melo" X-Mailer: PMMail 2000 Professional (2.20.2360) For Windows 98 (4.10.2222) In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: Casting timestamp Message-Id: <20020520023728.9AF79475897@postgresql.org> X-Archive-Number: 200205/199 X-Sequence-Number: 7834 On Sun, 19 May 2002 09:43:04 -0400, Joel Burton wrote: >> set datestyle = 'postgres'; >> show datestyle; >> select current_timestamp::text::timestamp; >> >> In the first one, I get >> timestamptz >> ------------------------------- >> 2002-05-13 10:19:55.158434-03 >> >> In the last one, I get >> ERROR: Bad timestamp external representation 'Mon May 13 10:19:56.671847 >> 2002 BRT' > >Edipo -- > >The second csating doesn't work because PG doesn't recognize the time zone >"BRT" -- despite the fact that it appeared to output it (!). [Full list of >PG timezones at >http://candle.pha.pa.us/main/writings/pgsql/sgml/timezones.html) Ok. I will try some confs next monday. (The server is at work) >What output do you get from > >SET DATESTYLE='iso'; >SELECT current_timestamp; >SET DATESTYLE='postgres'; >SELECT current_timestamp; bench=# SET DATESTYLE='iso'; SET VARIABLE bench=# SELECT current_timestamp; timestamptz ------------------------------- 2002-05-19 17:37:12.617842-03 (1 row) bench=# SET DATESTYLE='postgres'; SET VARIABLE bench=# SELECT current_timestamp; timestamptz ------------------------------------- Sun May 19 17:37:14.144733 2002 BRT (1 row) >And where are you located geographically? Brazil, Rio Grande do Norte, Natal. http://www.mapquest.com/maps/map.adp?zoom=0&mapdata=1FkKZg0N7LmqNpewo16MXL%2faxoMdIexib8Fmh8NEuL%2bgpCpk4% 2fpYs2AOLhVjNTzqyOmiu%2f3aWdA2FLUXHfelRY3Uo7w1EvAuROTwR4nQJWxe6SarHXPaqh5CKM36kni4N2Su351LXh5nGHrS%2fe5ZbI292rCxqIg% 2fLeCXhGtDD%2b5W4jkwM3s9s0S0Q%2bGqQdq4REF4aRET8EBFDAYUuBw7BXdOEd%2fHGCcOs3MTKBAyU2i8noDt%2fI0QeM38CI1A7uqymkh% 2fta59Zq6efUe0QuYcJSb1ekJbNE%2bkdX0UKtAkBeLNWr%2b%2bzLEu0rOny6DTLnLC3BTQItOmpWg3C6X1T%2fKtEQ%3d%3d (sorry for big link above. I'm the red star on map.) []'s Edipo Elder F. de Melo