pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Crawford <scrawford@pinpointresearch.com>
To: Geoffrey Myers <lists@serioustechnology.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: setting timezone
Date: Wed, 09 Nov 2011 07:29:01 -0800
Message-ID: <4EBA9C3D.9030701@pinpointresearch.com> (raw)
In-Reply-To: <4EBA7BCC.2030704@serioustechnology.com>
References: <4EBA7BCC.2030704@serioustechnology.com>

On 11/09/2011 05:10 AM, Geoffrey Myers wrote:
> We are moving a number of databases to new hardware.  Some of these 
> machines have the timezone set in the database differently then the 
> actual location of the machine as they are access from a different 
> timezone.  We were surprised to note that when we dump the database 
> and reloaded it on the new machine, it did not retain the timezone 
> setting.
>
> Is there a way to retain this information from the original database 
> when reloading?
>
> Thanks.
>

Time-zone setting is an attribute of the server configuration, not of 
the data contained in the database. Unless overidden by the timezone 
setting in postgresql.conf, PostgreSQL will use the server's time zone 
environment setting. You can specify a default time-zone for PostgreSQL 
independent of the server's environment by setting "timezone" explicitly 
in postgresql.conf.

Clients can override the default server setting with "SET TIMEZONE TO 
...;" which is useful when a single server is supporting users across 
many time zones.

Cheers,
Steve




view thread (6+ messages)  latest in thread

Message-ID: <4EBA9C3D.9030701@pinpointresearch.com>
Permalink:  ../4EBA9C3D.9030701@pinpointresearch.com/
Also on:    postgresql.org/message-id/4EBA9C3D.9030701@pinpointresearch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scrawford@pinpointresearch.com, lists@serioustechnology.com
  Subject: Re: setting timezone
  In-Reply-To: <4EBA9C3D.9030701@pinpointresearch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox