| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
| Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Steve Crawford <scrawford(at)pinpointresearch(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Unexpected date conversion results |
| Date: | 2025-11-22 00:55:08 |
| Message-ID: | 2555134.1763772908@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> I dug into the git history, and it has been like that since commit b3506006b564
> in 2002 (way before version 9.x). That commit fixed a bug that returned ten
> time the correct reault (but still offset from the UTC epoch).
I didn't bisect, but I get this in 9.1.24:
regression=# set timezone = 'America/Los_Angeles';
SET
regression=# select to_timestamp(extract(epoch from current_date));
to_timestamp
------------------------
2025-11-21 00:00:00-08
(1 row)
and this in 9.2.24:
regression=# set timezone = 'America/Los_Angeles';
SET
regression=# select to_timestamp(extract(epoch from current_date));
to_timestamp
------------------------
2025-11-20 16:00:00-08
(1 row)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2025-11-22 12:34:38 | Re: FK from logged to unlogged table? |
| Previous Message | Adrian Klaver | 2025-11-22 00:52:40 | Re: Unexpected date conversion results |