> > > I start fix my bug with "YY vs. zero" in formatting.c, and before it
> > > a see current CVS:
> > Hmm, is 2001-10-10 a daylight-savings transition day in your timezone?
> No, it's daylight-savings independent. The interesting thing is that
> you not see it. I found some things:
> * it not happen for GMT timezone, but for others only (I test 'Japan'
> and 'CET').
> * the difference between to_date and to_timestamp is that to_date use
> the timestamp_date() for conversion. And in the timestamp_date() is
> used timestamp2tm() that output bad 'tm' struct.
> 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
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.
In response to
pgsql-hackers by date
|Next:||From: pgsql-bugs||Date: 2002-01-03 16:12:05|
|Subject: Bug #549: select table privilege in postgres allows user to create index on the table|
|Previous:||From: Tom Lane||Date: 2002-01-03 15:51:06|
|Subject: Re: PGSQL - FAQ 4.1 |