Time Zone Query

From: Blake Crosby <me(at)blakecrosby(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Time Zone Query
Date: 2001-01-04 16:23:44
Message-ID: 5.0.2.1.2.20010105031331.01aa3008@home.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a (hopefully) quick question about the timestamp type and time zones.

Currently the database resides on a box in time zone with offset -05.
Inserts and Selects are being done from time zone +11.

Currently in the table the dates/times are stored with the -05 time zone
information attached:

date
------------------------
2001-01-01 08:42:24-05

I can get the correct date/time for my local time zone (+11) by using SET
TIMEZONE TO 'Australia/Sydney' . What I would like to know, am I able to
store the date/time in the database with the correct time zone offset (+11)
and not (-05)? ie, so it looks like this:

date
------------------------
2001-01-02 12:42:24+11

I want to be able to select the date from the table and not have to worry
about applying the proper time zone offset by using SET TIMEZONE TO.

Regards,
Blake Crosby.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-01-04 16:39:12 Re: Re: PQexec problem
Previous Message Marc SCHAEFER 2001-01-04 16:10:55 Re: libpq-fe: how to determine unique collision ?