pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: miracee <sho@miracee.de>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Inconsistent time zone handling in timetz
Date: Wed, 18 Nov 2026 13:10:19 -0500
Message-ID: <907221.1795025419@sss.pgh.pa.us> (raw)
In-Reply-To: <B6F7E197-70D6-4D09-9BB5-D2A576B0C1B2@miracee.de>
References: <B6F7E197-70D6-4D09-9BB5-D2A576B0C1B2@miracee.de>

miracee <sho@miracee.de> writes:
> # 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;

This is documented, no? [1]

    ... You can also specify a date but it will be ignored, except when
    you use a time zone name that involves a daylight-savings rule,
    such as America/New_York. In this case specifying the date is
    required in order to determine whether standard or
    daylight-savings time applies. The appropriate time zone offset is
    recorded in the time with time zone value and is output as stored;
    it is not adjusted to the active time zone.

I'd agree that the error message is pretty nonspecific :-(.  However,
the view this project takes is that timetz is a type with little if
any real-world use, so we're unlikely to put much effort into making
it more user-friendly.

			regards, tom lane

[1] https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME-INPUT-TIMES






view thread (2+ messages)

Message-ID: <907221.1795025419@sss.pgh.pa.us>
Permalink:  ../907221.1795025419@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/907221.1795025419@sss.pgh.pa.us

 · 

reply

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, sho@miracee.de
  Subject: Re: Inconsistent time zone handling in timetz
  In-Reply-To: <907221.1795025419@sss.pgh.pa.us>
  References: <B6F7E197-70D6-4D09-9BB5-D2A576B0C1B2@miracee.de> <907221.1795025419@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