| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Laszlo Nagy <gandalf(at)shopzeus(dot)com> |
| Cc: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: Messed up time zones |
| Date: | 2012-08-03 16:38:11 |
| Message-ID: | 19252.1344011891@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-performance |
Laszlo Nagy <gandalf(at)shopzeus(dot)com> writes:
> I have intentionally chosen an example where the local time is changed
> from summer time to winter time (e.g. local time suddenly "goes back"
> one hour). It demonstrates that you cannot use "at time zone ...."
> expression to convert a timestamptz into a desired time zone manually.
Um, yes you can. The trick is to use a timezone name, not an
abbreviation, in the AT TIME ZONE construct (for instance,
'Europe/Budapest' not just 'CET'). That will do the rotation
in a DST-aware fashion.
> As far as I'm concerned, I'm going to set the system's clock to UTC,
> store everything in timestamp field (in UTC), and use a program to
> convert fetched values before displaying them.
[ shrug... ] If you really insist on re-inventing that wheel, go
ahead, but it sounds to me like you'll just be introducing additional
points of failure.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laszlo Nagy | 2012-08-03 17:21:08 | Re: [ADMIN] Messed up time zones |
| Previous Message | Steve Crawford | 2012-08-03 16:20:31 | Re: Messed up time zones |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laszlo Nagy | 2012-08-03 17:21:08 | Re: [ADMIN] Messed up time zones |
| Previous Message | Steve Crawford | 2012-08-03 16:20:31 | Re: Messed up time zones |