public inbox for [email protected]  
help / color / mirror / Atom feed
TIMEZONE names
3+ messages / 3 participants
[nested] [flat]

* TIMEZONE names
@ 2021-06-12 15:21 PG Doc comments form <[email protected]>
  2021-06-12 19:44 ` Re: TIMEZONE names Tom Lane <[email protected]>
  2021-06-12 19:49 ` Re: TIMEZONE names David G. Johnston <[email protected]>
  0 siblings, 2 replies; 3+ messages in thread

From: PG Doc comments form @ 2021-06-12 15:21 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/datatype-datetime.html
Description:

The documentation states that some timezone names are recognized.  As far as
I understand others aren't.

This seems to be true:
$psql postgres -c "set TIMEZONE='bug' ; show timezone;"
ERROR:  invalid value for parameter "TimeZone": "bug"
$ echo $?
1

However adding a correct numerical offset leads Postgresql to accept a
non-existing timezone name:
$ psql postgres -c "set TIMEZONE='bug-1' ; show timezone;"
$ echo $?
0

Thank you.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: TIMEZONE names
  2021-06-12 15:21 TIMEZONE names PG Doc comments form <[email protected]>
@ 2021-06-12 19:44 ` Tom Lane <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2021-06-12 19:44 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

PG Doc comments form <[email protected]> writes:
> The documentation states that some timezone names are recognized.  As far as
> I understand others aren't.

There is more detail about that at

https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES

Note in particular that time zone abbreviations are not considered
valid values for the TimeZone setting.  However, once you add a
numeric offset, the string becomes a valid POSIX-style setting.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: TIMEZONE names
  2021-06-12 15:21 TIMEZONE names PG Doc comments form <[email protected]>
@ 2021-06-12 19:49 ` David G. Johnston <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2021-06-12 19:49 UTC (permalink / raw)
  To: [email protected]; Pg Docs <[email protected]>

On Sat, Jun 12, 2021, 12:28 PG Doc comments form <[email protected]>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/datatype-datetime.html
> Description:
>
> The documentation states that some timezone names are recognized.  As far
> as
> I understand others aren't.
>
> This seems to be true:
> $psql postgres -c "set TIMEZONE='bug' ; show timezone;"
> ERROR:  invalid value for parameter "TimeZone": "bug"
> $ echo $?
> 1
>
> However adding a correct numerical offset leads Postgresql to accept a
> non-existing timezone name:
> $ psql postgres -c "set TIMEZONE='bug-1' ; show timezone;"
> $ echo $?
> 0
>

That would be the Appendix B material the documentation is referencing.

David J.

>


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-06-12 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-12 15:21 TIMEZONE names PG Doc comments form <[email protected]>
2021-06-12 19:44 ` Tom Lane <[email protected]>
2021-06-12 19:49 ` David G. Johnston <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox