postgresql - postgres default timezone -
postgresql - postgres default timezone -
i installed postgresql 9 , time showing 1 hr behind server time.
running select now() shows: 2011-07-12 11:51:50.453842+00
the server date shows: tue jul 12 12:51:40 bst 2011
it 1 hr behind timezone shown in phppgadmin is: timezone etc/gmt0
i have tried going postgresql.conf , setting timezone = gmt running restart no change.
any ideas thought have used server timezone not?!
solution!: did set gmt before , hr behind..after searching around turns out needed set europe/london. takes business relationship +1 hr in british summer time, gmt not!
the time zone session parameter. so, can alter timezone current session.
see the doc.
set timezone 'gmt'; or, more closely next sql standard, utilize set time zone command. notice 2 words "time zone" code above uses single word "timezone".
set time zone 'utc'; the doc explains difference:
set time zone extends syntax defined in sql standard. standard allows numeric time zone offsets while postgresql allows more flexible time-zone specifications. other set features postgresql extensions.
postgresql
Comments
Post a Comment