From: Tom Lane <tgl@sss.pgh.pa.us>
To: jeff.sturm@helloworld.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16027: Invalid output of to_timestamp
Date: Thu, 26 Sep 2019 11:39:17 -0400
Message-ID: <13930.1569512357@sss.pgh.pa.us> (raw)
In-Reply-To: <16027-8b799f2d11947553@postgresql.org>
References: <16027-8b799f2d11947553@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff.sturm@helloworld.com
Subject: Re: BUG #16027: Invalid output of to_timestamp
In-Reply-To: <13930.1569512357@sss.pgh.pa.us>
References: <16027-8b799f2d11947553@postgresql.org> <13930.1569512357@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox