Trying to output a timestamp with time zone in the PostgreSQL.
I have tried several params, the first two are fine.
(1):
select time at time zone 'UTC' from sf where id='365498691097858048';
it outputs:
2013-08-08 15:44:13
(2):
select time at time zone 'PDT' from sf where id='365498691097858048';
it outputs
2013-08-08 08:44:13
But the third one confuses me:
(3):
select time at time zone 'UTC-07' from sf where id='365498691097858048';
2013-08-08 22:44:13
'UTC-07' is the same as 'PDT', why the outputs are totally different?
timeis supposed to be the name for a column holding .. what? atimestampor atimestamp with time zone? I can't find your table definition. Either way, don't use the reserved wordtimeas column name - even less for a column of different data type.UTC-07, parsing as far asUTCand going "I know that time zone", ignoring the-07suffix. I can't reproduce it here on my 9.3 install if so - what PostgreSQL version are you running? (Always include your PostgreSQL version in questions).