Timezone mismatch

Started by Leonardo M. Raméabout 11 years ago7 messagesgeneral
Jump to latest
#1Leonardo M. Ramé
l.rame@griensu.com

Hi, I had to change the O.S. timezone and aparently PostgreSql continues
using the old timezone, how can I force update it's time zone?.

Using PostgreSql 8.4 on Ubuntu Server 12.04.

To update the OS timezone I used sudo dpkg-reconfigure tzdata

Regards,

--
Leonardo M. Ram�
http://leonardorame.blogspot.com

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

#2Steve Crawford
scrawford@pinpointresearch.com
In reply to: Leonardo M. Ramé (#1)
Re: Timezone mismatch

On 03/20/2015 08:29 AM, "Leonardo M. Ramé" wrote:

Hi, I had to change the O.S. timezone and aparently PostgreSql
continues using the old timezone, how can I force update it's time zone?.

Using PostgreSql 8.4 on Ubuntu Server 12.04.

To update the OS timezone I used sudo dpkg-reconfigure tzdata

Did you reload/restart PostgreSQL after making the change?

What is the setting of timezone in postgresql.conf?

What is set as the timezone on the *client* side? (That's really more
relevant for timestamp_tz data.)

Cheers,
Steve

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

#3Leonardo M. Ramé
l.rame@griensu.com
In reply to: Steve Crawford (#2)
Re: Timezone mismatch

El 20/03/15 a las 12:38, Steve Crawford escibi�:

On 03/20/2015 08:29 AM, "Leonardo M. Ram�" wrote:

Hi, I had to change the O.S. timezone and aparently PostgreSql
continues using the old timezone, how can I force update it's time
zone?.

Using PostgreSql 8.4 on Ubuntu Server 12.04.

To update the OS timezone I used sudo dpkg-reconfigure tzdata

Did you reload/restart PostgreSQL after making the change?

What is the setting of timezone in postgresql.conf?

What is set as the timezone on the *client* side? (That's really more
relevant for timestamp_tz data.)

Cheers,
Steve

Hi Steve, I did a "select pg_reload_conf();" from psql. Is this enough?.

In postgresql.conf I have timezone and timezone_abbreviations commented,
as default.

From client side I never set any timezone related parameter.

Leonardo.

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

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Leonardo M. Ramé (#3)
Re: Timezone mismatch

On 03/20/2015 08:43 AM, "Leonardo M. Ram�" wrote:

El 20/03/15 a las 12:38, Steve Crawford escibi�:

On 03/20/2015 08:29 AM, "Leonardo M. Ram�" wrote:

Hi, I had to change the O.S. timezone and aparently PostgreSql
continues using the old timezone, how can I force update it's time
zone?.

Using PostgreSql 8.4 on Ubuntu Server 12.04.

To update the OS timezone I used sudo dpkg-reconfigure tzdata

Did you reload/restart PostgreSQL after making the change?

What is the setting of timezone in postgresql.conf?

What is set as the timezone on the *client* side? (That's really more
relevant for timestamp_tz data.)

Cheers,
Steve

Hi Steve, I did a "select pg_reload_conf();" from psql. Is this enough?.

In postgresql.conf I have timezone and timezone_abbreviations commented,
as default.

From client side I never set any timezone related parameter.

I am not sure what the exact issue is?

How are you determining that the new time zone is not being used?

What was the old time zone, what is the new one?

Leonardo.

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#5Leonardo M. Ramé
l.rame@griensu.com
In reply to: Adrian Klaver (#4)
Re: Timezone mismatch

El 20/03/15 a las 13:03, Adrian Klaver escibi�:

I am not sure what the exact issue is?

How are you determining that the new time zone is not being used?

What was the old time zone, what is the new one?

I don't know if the new time zone is beign used, It just coincede with
the old local time zone which was -3 hours compared to UTC.

Old time zone was:

Current default time zone: 'America/Argentina/Cordoba'
Local time is now: Fri Mar 20 06:46:58 ART 2015.
Universal Time is now: Fri Mar 20 09:46:58 UTC 2015.

New time zone is:

Current default time zone: 'Etc/UTC'
Local time is now: Fri Mar 20 09:47:48 UTC 2015.
Universal Time is now: Fri Mar 20 09:47:48 UTC 2015.

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

#6Leonardo M. Ramé
l.rame@griensu.com
In reply to: Leonardo M. Ramé (#5)
Re: Timezone mismatch

El 20/03/15 a las 14:11, "Leonardo M. Ram�" escibi�:

El 20/03/15 a las 13:03, Adrian Klaver escibi�:

I am not sure what the exact issue is?

How are you determining that the new time zone is not being used?

What was the old time zone, what is the new one?

I don't know if the new time zone is beign used, It just coincede with
the old local time zone which was -3 hours compared to UTC.

Old time zone was:

Current default time zone: 'America/Argentina/Cordoba'
Local time is now: Fri Mar 20 06:46:58 ART 2015.
Universal Time is now: Fri Mar 20 09:46:58 UTC 2015.

New time zone is:

Current default time zone: 'Etc/UTC'
Local time is now: Fri Mar 20 09:47:48 UTC 2015.
Universal Time is now: Fri Mar 20 09:47:48 UTC 2015.

Well, pg_load_conf didn't reoload the timezone config from
postgresql.conf, I had to restart the service to be changed.

Leonardo.

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

#7Vick Khera
vivek@khera.org
In reply to: Leonardo M. Ramé (#6)
Re: Timezone mismatch

On Fri, Mar 20, 2015 at 1:55 PM, "Leonardo M. Ramé" <l.rame@griensu.com>
wrote:

Well, pg_load_conf didn't reoload the timezone config from
postgresql.conf, I had to restart the service to be changed.

That's par for the course for pretty much any long-living process. The time
zone is initialized once and only once.