Re: patch for datetime.c - Mailing list pgsql-patches

From Ian Lance Taylor
Subject Re: patch for datetime.c
Date
Msg-id sisnigqu2d.fsf@daffy.airs.com
Whole thread Raw
In response to Re: patch for datetime.c  (Joseph Shraibman <jks@selectacast.net>)
List pgsql-patches
Joseph Shraibman <jks@selectacast.net> writes:

> Well not horrid, but stopgap.  There needed to be soemthing that kept
> there from being 60 seconds in the output.

Don't forget that there are minutes with 61 seconds in UTC, due to
leap seconds.  See, e.g.,
    http://cr.yp.to/proto/utctai.html

For example, 1997-06-30 23:59:60 is a correct time in UTC.  Many free
Unix systems will return times like this when the time zone is set
appropriately.  For example, on my Red Hat 6.1 system, this:
    TZ=right/UTC date --date='June 30, 1997 23:59:60 +0000'
will print this:
    Mon Jun 30 23:59:60 UTC 1997
(for comparison:
    > TZ=posix/UTC date --date='June 30, 1997 23:59:60 +0000'
    Tue Jul  1 00:00:00 UTC 1997
)

Ian

---------------------------(end of broadcast)---------------------------
TIP 231: There are times when truth is stranger than fiction and lunch
time is one of them.

pgsql-patches by date:

Previous
From: Kyle VanderBeek
Date:
Subject: Re: JDBC int8 hack
Next
From: Bruce Momjian
Date:
Subject: Re: dbf2pg improvements (password, charset convertions,etc.)