Skip site navigation (1) Skip section navigation (2)

We're not lax enough about maximum time zone offset from UTC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Patric Bechtel <patric(dot)bechtel(at)gmail(dot)com>
Subject: We're not lax enough about maximum time zone offset from UTC
Date: 2012-05-30 22:10:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Currently, our datetime input code thinks that any UTC offset of more
than 14:59:59 either way from Greenwich must be a mistake.  However,
after seeing Patric Bechtel's recent bug report, I went trolling in the
Olson timezone files to see what are the largest offsets used there.
I found three entries that are further out than that:

Zone Asia/Manila	-15:56:00 -	LMT	1844 Dec 31
Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
Zone America/Metlakatla	 15:13:42 -	LMT	1867 Oct 18

These are all ancient history of course; it does not appear that any
zones *currently* use offsets larger than +/- 14 hours, which if memory
serves is what we considered when we set the existing sanity limit.

However, as pointed out by Patric, if you dump and restore an old
timestamptz value in one of these zones, it will fail to restore because
of the sanity check.  I think therefore that we'd better enlarge the
allowed range to 15:59:59 either way.

			regards, tom lane


pgsql-hackers by date

Next:From: Robert HaasDate: 2012-05-30 22:14:41
Subject: patch: avoid heavyweight locking on hash metapage
Previous:From: Merlin MoncureDate: 2012-05-30 22:01:04
Subject: Re: Early hint bit setting

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group