Server Timezone

Started by Robert DiFalcoabout 12 years ago3 messagesgeneral
Jump to latest
#1Robert DiFalco
robert.difalco@gmail.com

Is there any way to set the timezone of the postgres server differently
than the OS? I *have* tried setting timezone = 'UTC' in my postgresql.conf
file but that seems to be a VIEW of time zone. It doesn't seem to behave
the same as running a postgresql server on a machine that is in UTC. The
machine I tried this setting on was a MAC machine running in the
America/Los_Angeles time zone.

Thanks!

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert DiFalco (#1)
Re: Server Timezone

Robert DiFalco <robert.difalco@gmail.com> writes:

Is there any way to set the timezone of the postgres server differently
than the OS? I *have* tried setting timezone = 'UTC' in my postgresql.conf
file but that seems to be a VIEW of time zone. It doesn't seem to behave
the same as running a postgresql server on a machine that is in UTC.

You would need to be more precise about "doesn't seem to behave the same"
for anyone to help you. Setting the timezone parameter (and perhaps
log_timezone) should cover it, so far as the server is concerned.

Are you sure your client-side code isn't doing something helpful with
what it thinks the timezone is?

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Robert DiFalco
robert.difalco@gmail.com
In reply to: Tom Lane (#2)
Re: Server Timezone

You're right. This was my error.

Sent from my iPhone

On Apr 7, 2014, at 8:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert DiFalco <robert.difalco@gmail.com> writes:

Is there any way to set the timezone of the postgres server differently
than the OS? I *have* tried setting timezone = 'UTC' in my postgresql.conf
file but that seems to be a VIEW of time zone. It doesn't seem to behave
the same as running a postgresql server on a machine that is in UTC.

You would need to be more precise about "doesn't seem to behave the same"
for anyone to help you. Setting the timezone parameter (and perhaps
log_timezone) should cover it, so far as the server is concerned.

Are you sure your client-side code isn't doing something helpful with
what it thinks the timezone is?

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general