Re: PG is in different timezone than the OS
От | Scott Marlowe |
---|---|
Тема | Re: PG is in different timezone than the OS |
Дата | |
Msg-id | dcc563d10801021206m24c23294m49d9855ddd670a73@mail.gmail.com обсуждение исходный текст |
Ответ на | PG is in different timezone than the OS ("Fernando Hevia" <fhevia@ip-tel.com.ar>) |
Ответы |
Re: PG is in different timezone than the OS
|
Список | pgsql-sql |
On Jan 2, 2008 12:43 PM, Fernando Hevia <fhevia@ip-tel.com.ar> wrote: > Hi all, > > I am not sure if this is the correct list to post this issue. Please let me > know if there is a more suitable one. > > Argentina's government has recently decreted a timezone change for the > summer (daylight's savings) where local time zone changes from GMT-3 to > GMT-2. The Argentinean Summer Timezone is named "ARST". Well, you're going to have an issue until the timezone databases get updated, then postgresql gets updated. The problem is that with date math you need to know when things change from one offset to another. I.e. ARST is not going to be a constant offset. It will change based on what date it is, right? If so, then simply setting the offset to -03:00:00 isn't going to fix your problem. Assuming you're on 8.2.x, you can look at the timezones available with these queries: select * from pg_timezone_abbrevs; select * from pg_timezone_names; If one looks in pg_timezone_names one can find these entries: America/Argentina/La_Rioja | ART | -03:00:00 | fAmerica/Argentina/Buenos_Aires | ART | -03:00:00 | fAmerica/Argentina/San_Juan | ART | -03:00:00 | fAmerica/Argentina/Mendoza | ART | -03:00:00 | f and so on. There is no ARST in the database for 8.2.5 that I know of. select * from pg_timezone_names where utc_offset = '-02:00:00'::interval and is_dst is true; name | abbrev | utc_offset | is_dst --------------------------+--------+------------+--------America/Sao_Paulo | BRST | -02:00:00 | tAmerica/Montevideo | UYST | -02:00:00 | tBrazil/East | BRST | -02:00:00 | t ... CUT for brevity shows a few timezones that are -0200 and have dst, which means that they'll go to -0300 in the spring. If the dates they change are the same as yours, you could use one of them. Try setting your timezone to one of those and see if the offset changes on the right date.
В списке pgsql-sql по дате отправления: