| From: | miracee <sho(at)miracee(dot)de> |
|---|---|
| To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Inconsistent time zone handling in timetz |
| Date: | 2026-11-18 10:56:24 |
| Message-ID: | B6F7E197-70D6-4D09-9BB5-D2A576B0C1B2@miracee.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
I came across this issue yesterday during one of my PostgreSQL training courses. We were using PostgreSQL 18.7.
I used PostgreSQL 17.9 to reproduce the issue.
# SELECT '10:00 CET'::timetz;
timetz
-------------
10:00:00+01
(1 row)
# SELECT '10:00 Europe/Berlin'::timetz;
ERROR: invalid input syntax for type time with time zone: "10:00 Europe/Berlin"
LINE 1: SELECT '10:00 Europe/Berlin'::timetz;
There is another issue with timetz.
The session time zone is set to UTC:
# SHOW timezone;
TimeZone
----------
Etc/UTC
With timestamptz, both time zone specifications work correctly:
# SELECT '2026-11-17 10:00 CET'::timestamptz;
timestamptz
------------------------
2026-11-17 09:00:00+00
# SELECT '2026-11-17 10:00 Europe/Berlin'::timestamptz;
timestamptz
------------------------
2026-11-17 09:00:00+00
However, with timetz:
# SELECT '10:00 CET'::timetz;
timetz
-------------
10:00:00+01
(1 row)
I would expect 09:00:00+00 rather than 10:00:00+01, as the session time zone is set to UTC.
Best regards,
miracee (Susanne)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tender Wang | 2026-11-18 12:30:20 | Re: BUG #19912: MERGE NOT MATCHED BY SOURCE sees stale source values after concurrent update (EPQ) |
| Previous Message | Shlok Kyal | 2026-11-18 10:46:12 | Re: Logical replication commits duplicates in DEFERRABLE unique indexes |