pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fernando Hevia <fhevia@ip-tel.com.ar>
To: 'SQL Postgresql List' <pgsql-sql@postgresql.org>
Subject: PG is in different timezone than the OS
Date: Wed, 2 Jan 2008 16:43:42 -0200
Message-ID: <00ff01c84d6f$65e64ec0$8f01010a@iptel.com.ar> (raw)

Hi all,

I am not sure if this is the correct list to post this issue. Please let me
know if there is a more suitable one.

Argentina's government has recently decreted a timezone change for the
summer (daylight's savings) where local time zone changes from GMT-3 to
GMT-2. The Argentinean Summer Timezone is named "ARST".

My first problem is that Postgres still hangs with GMT-3 while OS is at
GMT-2

*OS date*
# date -R ; date
Wed, 02 Jan 2008 16:07:36 -0200
Wed Jan  2 16:07:36  ARST 2008

*Postgres*
radius=# select now()::timestamp with time zone;
              now
-------------------------------
 2008-01-02 15:07:59.435233-03
(1 row)

As you can see PG is at GMT-03. Restart has been done to no effect. 
Postgres.conf settings are:

# - Locale and Formatting -

#datestyle = 'iso, mdy'
#timezone = unknown                     # actually, defaults to TZ
                                        # environment setting
#australian_timezones = off
#extra_float_digits = 0                 # min -15, max 2
#client_encoding = sql_ascii            # actually, defaults to database
                                        # encoding

I have also tried with:
timezone='America/Argentina/Cordoba'

How do I tell postgres that it is located in Argentina/Cordoba or GMT-02? Is
there a way to have it relay to the OS?


My second problem is that Postgres doesn't recognize the timezone ARST.

pg=# select '01:13:16.426 ARST Wed Jan 2 2008'::timestamp with time zone;
ERROR:  invalid input syntax for type timestamp with time zone:
"01:13:16.426 ARST Wed Jan 2 2008"


Whereas with the previous ART timezone it did well:

pg=# select '01:13:16.426 ART Wed Jan 2 2008'::timestamp with time zone;
        timestamptz
----------------------------
 2008-01-02 01:13:16.426-03
(1 row)


I'm lost here. ARST isn't new. It has been used in former years.
Any help would be greatly appreciated.

Regards,
Fernando




view thread (4+ messages)  latest in thread

Message-ID: <00ff01c84d6f$65e64ec0$8f01010a@iptel.com.ar>
Permalink:  ../00ff01c84d6f$65e64ec0$8f01010a@iptel.com.ar/
Also on:    postgresql.org/message-id/00ff01c84d6f$65e64ec0$8f01010a@iptel.com.ar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: fhevia@ip-tel.com.ar
  Subject: Re: PG is in different timezone than the OS
  In-Reply-To: <00ff01c84d6f$65e64ec0$8f01010a@iptel.com.ar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox