| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| 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:20:11 |
| Message-ID: | 20071122212011.GN4903@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Andrew Maclean 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.
alvherre=# select extract(timezone from now());
date_part
-----------
-10800
(1 row)
--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"Having your biases confirmed independently is how scientific progress is
made, and hence made our great society what it is today" (Mary Gardiner)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2007-11-22 21:30:52 | Re: Date Timezone |
| Previous Message | Andrew Maclean | 2007-11-22 21:16:29 | Date Timezone |