Re: how to show time zone with numerical offset in CSV log?
От | Tom Lane |
---|---|
Тема | Re: how to show time zone with numerical offset in CSV log? |
Дата | |
Msg-id | 6681.1442935329@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: how to show time zone with numerical offset in CSV log? (Michael Zoet <Michael.Zoet@zoet.de>) |
Ответы |
Re: how to show time zone with numerical offset in CSV
log?
|
Список | pgsql-general |
Michael Zoet <Michael.Zoet@zoet.de> writes: > Can you explain what '<-0400>+4' exactly means? It's a POSIX-style zone name specifying the STD abbreviation "-0400", UTC offset 4 hours west of Greenwich, and no DST behavior. > And why the string > '<+0200>-2' prints the date & time with the correct time and +0200 for > my time zone CEST? Same thing for 2 hours east of Greenwich. Remember POSIX and ISO have opposite sign conventions. > And how can this automatically be changed if Germany switches from > summer time (CEST with +0200) to winter time (CET +0100)? Well, you could write <+0200>-2<+0100> but I'm not sure I would recommend it. That would result in switching on the DST transition days specified in the "posixrules" timezone database file, which by default will be USA not European rules. You could replace the posixrules file with some suitable European zone file, but that would be more invasive than you might want (especially if the zone database is shared with non-Postgres applications); and even if that's OK, it's practically certain you'd forget to re-fix it after some future software update overwrites the zone files. The best compromise might be to just use <+0000>+0, ie force it to print in GMT always. regards, tom lane
В списке pgsql-general по дате отправления: