RES: RESTORING A DATABASE WITH DIFFERENT TIMEZONES

From: "Rodrigo Sakai" <rodrigo(dot)sakai(at)zanthus(dot)com(dot)br>
To: "'Brandon Aiken'" <BAiken(at)winemantech(dot)com>, "'Postgres general mailing list'" <pgsql-general(at)postgresql(dot)org>
Subject: RES: RESTORING A DATABASE WITH DIFFERENT TIMEZONES
Date: 2006-12-21 18:36:46
Message-ID: 001101c7252e$f8534ac0$4700a8c0@SOFTWARE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Actually I want the server to behave in the time zone 'BRST' (this is
already configured). But the machine where the dump was done was with a time
zone that is -2 from GMT! So I need to restore this dump in my server, but
maintain the 00:00:00 at the hour part!

Is there a way???

-----Mensagem original-----
De: Brandon Aiken [mailto:BAiken(at)winemantech(dot)com]
Enviada em: quinta-feira, 21 de dezembro de 2006 14:00
Para: rodrigo(dot)sakai(at)zanthus(dot)com(dot)br; Postgres general mailing list
Assunto: RE: [GENERAL] RESTORING A DATABASE WITH DIFFERENT TIMEZONES

'2006-12-20 00:00:00-02' and '2006-12-19 23:00:00-03' *are* the same
time. You *did* preserve it. Is your application unaware of timezone?

If you want the server to behave like it's in a different time zone that
where it actually is, configure the locale in postgresql.conf.

http://www.postgresql.org/docs/8.2/interactive/runtime-config-client.htm
l#GUC-TIMEZONE

--
Brandon Aiken
CS/IT Systems Engineer
________________________________________
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Rodrigo Sakai
Sent: Thursday, December 21, 2006 12:33 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] RESTORING A DATABASE WITH DIFFERENT TIMEZONES

Hi all,

I'm having some troubles with time zones! I have a database dump file
that have the date fields stored as '2006-12-20 00:00:00-02'!
And I have to restore it in a database that has the time zone configured
as 'BRST' (-3 from GMT). So, when it is restored the value becomes
'2006-12-19 23:00:00-03'. Ok this is logic because the difference of
time zones.

But I have to restore it and maintain the same value of datetime! How
can I do it?????

Thanks in advance!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benjamin Smith 2006-12-21 19:10:04 Partitioning Vs. Split Databases - performance?
Previous Message Richard Huxton 2006-12-21 18:06:50 Re: RES: RESTORING A DATABASE WITH DIFFERENT TIMEZONES