Re: BUG #16027: Invalid output of to_timestamp
От | Tom Lane |
---|---|
Тема | Re: BUG #16027: Invalid output of to_timestamp |
Дата | |
Msg-id | 13930.1569512357@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #16027: Invalid output of to_timestamp (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
RE: BUG #16027: Invalid output of to_timestamp
|
Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes: > With a date in year 1904 or earlier, the to_timestamp function outputs > unexpected characters: > template1=# select to_timestamp('19041231','YYYYMMDD'); > to_timestamp > ------------------------------ > 1904-12-31 00:00:00-05:32:11 > Expected is "1904-12-31 00:00:00-06" There's nothing particularly unexpected about that. I surmise that you're using the America/Detroit zone, because nothing else matches that UTC offset, and what the IANA timezone database has for Detroit is # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Detroit -5:32:11 - LMT 1905 -6:00 - CST 1915 May 15 2:00 with some commentary explaining why they think Detroit adopted standard time in 1905 rather than some other year. Before standardized time, most places observed local solar time, so tzdb provides an estimate of what the UTC offset would have been for that in Detroit. If this discombobulates you, you can edit your local copy of the tzdb files; but it's not wrong from our standpoint. regards, tom lane
В списке pgsql-bugs по дате отправления: