Re: 8.1.x (tested 8.1.8) timezone bugs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.1.x (tested 8.1.8) timezone bugs
Date: 2007-03-13 19:18:39
Message-ID: 8354.1173813519@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> That is my actual concern. Before DST it wasn't an issue, now it is. Is
> that PostgreSQL's problem? Probably not, but it certainly seems
> inconsistent.

[ digs around... ] Here we are (in localtime.c):

/*
* The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
* We default to US rules as of 1999-08-17.
* POSIX 1003.1 section 8.1.1 says that the default DST rules are
* implementation dependent; for historical reasons, US rules are a
* common default.
*/
#define TZDEFRULESTRING ",M4.1.0,M10.5.0"

AFAICS there is not any provision in the code that reads that string to
have different rules in different years, so you're more or less stuck
with being wrong before 2007 or being wrong after. Realistically this
means that POSIX-style rule strings are no longer useful, and you'd
better start using one of the zic timezone names. Which, prior to 8.2,
means you'd better spell PST8PDT in upper case ... or maybe insert a
symlink in the timezone/ tree to make the lower-case name valid ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-03-13 19:24:46 Re: Synchronized Scan update
Previous Message Joshua D. Drake 2007-03-13 19:10:50 Re: 8.1.x (tested 8.1.8) timezone bugs