Postgresql: how to correctly create timestamp with timezone from
timestamp, timezone fields
I have a table with a timestamp without time zone. YYYY-MM-DD HH:MM:SS
and a field "timezone" that is either "P" for Pacific or "M" for Mountain.
I need to create a field of type "timestamp with time zone"
Given the two fields I have, is there a way to do this that correctly
accounts for Daylight Saving Time?
Specifically: timestamp: 2013-11-03 01:00:00 timezone: "P" would become:
2013-11-03 01:00:00-07
and timestamp: 2013-11-03 03:00:00 timezone: "P" would become: 2013-11-03
01:00:00-08
No comments:
Post a Comment