Platform dependency in timestamp parsing - Mailing list pgsql-hackers

From Tom Lane
Subject Platform dependency in timestamp parsing
Date
Msg-id 10123.1003530564@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
Using current sources, the following sequence:

set DateStyle TO 'Postgres';
set TimeZone TO 'PST8PDT';
select '2001-09-22T18:19:20'::timestamp(2);

produces
        timestamptz
------------------------------Sat Sep 22 11:19:20 2001 PDT

on my HPUX box, and evidently also on your machine because that's
what's in the timestamptz expected file.  However, on a LinuxPPC
machine I get
        timestamptz
------------------------------Sat Sep 22 18:19:20 2001 PDT

ie, the value after 'T' is interpreted as local time not GMT time.

Question 1: which behavior is correct per spec?  I'd have expected
local time myself, but I'm not sure where this is specified.

Question 2: where to look for the reason for the difference in the
code?  I'm a tad surprised that the HP box behaves more like
yours does than the LinuxPPC box ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bill Studenmund
Date:
Subject: Re: schema support, was Package support for Postgres
Next
From: Thomas Lockhart
Date:
Subject: Re: Platform dependency in timestamp parsing