Tuesday, August 24, 2010

change postgresql time zone for west Australia

In west Australia, like Perth, when you are using postgresql database, you may need to change the time zone abbreviations to Australia:

change it for a session

postgres=# set timezone_abbreviations to 'Australia';

change it for database

postgres=# alter database DATABASENAME set timezone_abbreviations to 'Australia';