Обсуждение: Timezone mismatch

Поиск
Список
Период
Сортировка

Timezone mismatch

От
"Leonardo M. Ramé"
Дата:
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


Re: Timezone mismatch

От
Steve Crawford
Дата:
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





Re: Timezone mismatch

От
"Leonardo M. Ramé"
Дата:
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.


Re: Timezone mismatch

От
Adrian Klaver
Дата:
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


Re: Timezone mismatch

От
"Leonardo M. Ramé"
Дата:
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.




Re: Timezone mismatch

От
"Leonardo M. Ramé"
Дата:
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.



Re: Timezone mismatch

От
Vick Khera
Дата:

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.