Re: datetime error? - Mailing list pgsql-hackers

From Karel Zak
Subject Re: datetime error?
Date
Msg-id 20020104112308.A18675@zf.jcu.cz
Whole thread Raw
In response to Re: datetime error?  (Thomas Lockhart <lockhart@fourpalms.org>)
List pgsql-hackers
On Thu, Jan 03, 2002 at 03:56:23PM +0000, Thomas Lockhart wrote:
> 
> >    The basic difference is that timestamp2tm() with right output do
> >    code that call localtime() and timestamp2tm() with bad output skip
> >    it, because 'tzp' is not defined ("if (tzp != NULL)" in this
> >    timestamp2tm()).
> 
> Ah! Have you tried calling timestamptz_date() instead? That one allows
> handling time zones internally. Before 7.2, timestamp_date() did handle
> time zones, but now we have TIMESTAMP WITHOUT TIME ZONE and TIMESTAMP
> WITH TIME ZONE so those internal routines changed out from under you.
You are right. 
I don't want send patch with 2 chars. Can you or anyone other fix itin src/backend/utils/adt/formatting.c in function
to_date(line cca 3130) and rename timestamp_date to timestamptz_date?
^^Thanks.The formatting.c is ready to RC1 with this fix.
 
       Karel
-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz


pgsql-hackers by date:

Previous
From: Daniel Kalchev
Date:
Subject: Re: Bulkloading using COPY - ignore duplicates?
Next
From: Hannu Krosing
Date:
Subject: Re: LWLock contention: I think I understand the problem