FAQ
I just ran into a small mystery. I am trying to set the time zone
during my session and here is what happens:

megan=# set timezone to 'EST'
megan=# do some work here
megan=# set timezone to 'PST'
ERROR: unrecognized time zone name: "PST"
megan=# set timezone to 'PDT'
ERROR: unrecognized time zone name: "PDT"
megan=# set timezone to 'MST'
megan=# set timezone to 'GMT'
megan=# select version();
version
--------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.0.0 20050519 (Red Hat 4.0.0-8)

My default timezone is PDT for this time of year.

I am a bit mystified. Any suggestions?

Regards,

Jim

Search Discussions

  • Michael Fuhr at Jul 28, 2006 at 10:20 pm

    On Fri, Jul 28, 2006 at 01:59:55PM -0700, James G Wilkinson wrote:
    I just ran into a small mystery. I am trying to set the time zone
    during my session and here is what happens:
    You can find the list of acceptable time zone names in Appendix B
    of the documentation:

    http://www.postgresql.org/docs/8.1/interactive/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
    My default timezone is PDT for this time of year.
    Try 'PST8PDT' or 'US/Pacific'.

    --
    Michael Fuhr
  • James G Wilkinson at Jul 28, 2006 at 10:36 pm
    Doh! Brain cramp!

    I have received a couple of replies to this effect. So much for
    looking at the correct table (i.e., B.6). Odd though that some
    of the values from Table B.4 work as well for
    "SET TIMEZONE TO <timezone>."

    Regards,

    Jim

    Michael Fuhr wrote:
    On Fri, Jul 28, 2006 at 01:59:55PM -0700, James G Wilkinson wrote:

    I just ran into a small mystery. I am trying to set the time zone
    during my session and here is what happens:
    You can find the list of acceptable time zone names in Appendix B
    of the documentation:

    http://www.postgresql.org/docs/8.1/interactive/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE


    My default timezone is PDT for this time of year.
    Try 'PST8PDT' or 'US/Pacific'.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJul 28, '06 at 9:28p
activeJul 28, '06 at 10:36p
posts3
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

James G Wilkinson: 2 posts Michael Fuhr: 1 post

People

Translate

site design / logo © 2022 Grokbase