using 'zoneinfo' to manipulate dates ...

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: using 'zoneinfo' to manipulate dates ...
Date: 2005-06-26 03:24:53
Message-ID: 20050626001729.G993@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Does anyone have a 'table of timezones' that could be used to "localize"
as part of a query?

For instance, something like:

SELECT date
FROM table
WHERE ( time || ' ' || ( SELECT timezone
FROM zones
WHERE id = table.timezone )) = '2004-12-12';

Something like this, but that works:

# select ( now() || ' ' || 'PST8PDT' )::timestamp;
ERROR: invalid input syntax for type timestamp: "2005-06-26 00:23:29.789703-03 PST8PDT"

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2005-06-26 06:15:01 Re: using 'zoneinfo' to manipulate dates ...
Previous Message Jan Wieck 2005-06-25 14:00:53 Re: people who buy A, also buy C, D, E