DST and time zones - Mailing list pgsql-novice

From A Gilmore
Subject DST and time zones
Date
Msg-id 414C721F.30107@shaw.ca
Whole thread Raw
Responses DST and time zones
Re: DST and time zones
List pgsql-novice
Hello,

I need a method of returning a date in a given timezone and accomidating
DST.  For example, my server is set to UTC, Id like to return the epoch
for Vancouver Canada.  You can do a

select extract(epoch from now() at time zone 'pst');

Of course this is wrong since DST is in affect, so it should be 'pdt'
not 'pst'.  I understand that postgresql doesn't do this itself, it uses
the OS, however does anyone know a crafty way to get the current time in
any timezone, whether DST is in effect or not?

Im using pg 7.4.3 running on Linux 2.4.25.

Thanks in advance.
A Gilmore


pgsql-novice by date:

Previous
From: Neacal
Date:
Subject: Importing data into postgreSQL from FileMaker?
Next
From: brew@theMode.com
Date:
Subject: DST and time zones