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

Re: Bug in timezone-parsing?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: villeja(at)avoltus(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug in timezone-parsing?
Date: 2007-04-16 16:06:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
villeja(at)avoltus(dot)com writes:
> I found a problem with the parsing of timezone-offsets in the current
> PG-driver. It seems something weird happened between 1921 and 1922, as the
> offset changes from hour-precision to second-precision:

> postgres=> select '1921-01-01'::timestamptz, '1922-01-01'::timestamptz;
>          timestamptz          |      timestamptz
> ------------------------------+------------------------
>  1921-01-01 00:00:00+01:39:52 | 1922-01-01 00:00:00+02

FWIW, that is expected behavior if you're using the Europe/Helsinki time
zone data:

Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
			1:39:52	-	HMT	1921 May    # Helsinki Mean Time
			2:00	Finland	EE%sT	1981 Mar 29 2:00
			2:00	EU	EE%sT

Quite a lot of places were observing local mean time up to the early
1900s, so you'll see very strange GMT offsets for dates that far back.

			regards, tom lane

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2007-04-16 16:45:05
Subject: Re: How to modify my class inherited from java.sql.Array
Previous:From: Kris JurkaDate: 2007-04-16 15:36:43
Subject: Re: Bug in timezone-parsing?

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