From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: datetime error? |
Date: | 2002-01-03 15:56:23 |
Message-ID: | 3C347F27.722AEDDD@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > 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
> 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.
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql-bugs | 2002-01-03 16:12:05 | Bug #549: select table privilege in postgres allows user to create index on the table |
Previous Message | Tom Lane | 2002-01-03 15:51:06 | Re: PGSQL - FAQ 4.1 |