DST and time zones

Поиск
Список
Период
Сортировка
От A Gilmore
Тема DST and time zones
Дата
Msg-id 414C721F.30107@shaw.ca
обсуждение исходный текст
Ответы DST and time zones  (brew@theMode.com)
Re: DST and time zones  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Neacal
Дата:
Сообщение: Importing data into postgreSQL from FileMaker?
Следующее
От: brew@theMode.com
Дата:
Сообщение: DST and time zones