Search Postgresql Archives

Re: Date Timezone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux