Re: Date Timezone

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: a(dot)maclean(at)cas(dot)edu(dot)au
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Date Timezone
Date: 2007-11-22 21:30:52
Message-ID: dcc563d10711221330w79979c3by2c4608b92c49d791@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 22, 2007 3:16 PM, Andrew Maclean <andrew(dot)amaclean(at)gmail(dot)com> wrote:
> I have a problem in that dates are stored as UTC in my dataase. I.e. without
> timezone.
>
> What I want to do: is to get this date from the server and add the server's
> current time zone to it. Then I will present a list of dates and times to
> the user in their time-zone. How can I do this? I have been trying to get
> the timezone from now() and adding it but I can't see how.
>
> Of course this doesn't account for daylight saving.

Does this help?

http://www.postgresql.org/docs/8.2/interactive/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-22 21:51:23 Re: Date Timezone
Previous Message Alvaro Herrera 2007-11-22 21:20:11 Re: Date Timezone