pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
date_part bug?
2+ messages / 2 participants
[nested] [flat]

* date_part bug?
@ 2001-03-28 10:52  Salvador Mainé <salvamaine@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Salvador Mainé @ 2001-03-28 10:52 UTC (permalink / raw)
  To: pgsql-sql

Hello:

I'm using postgres 7.0.2. When I use date_part('day', date) sometimes I
get wrong values. Ie: 
and date_part('day', '1999-3-28')=27

and date_part('day', '2000-3-26')=25

Is it a bug? Is there any SQL equivalent function?

-- 
Salvador Mainé



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: date_part bug?
@ 2001-03-31 07:35  Richard Huxton <dev@archonet.com>
  parent: Salvador Mainé <salvamaine@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Huxton @ 2001-03-31 07:35 UTC (permalink / raw)
  To: salva@ronincoders.com; +Cc: pgsql-sql

"Salvador Mainé" wrote:
> 
> Hello:
> 
> I'm using postgres 7.0.2. When I use date_part('day', date) sometimes I
> get wrong values. Ie:
> and date_part('day', '1999-3-28')=27
> 
> and date_part('day', '2000-3-26')=25
> 
> Is it a bug? Is there any SQL equivalent function?

I remember some issues with summertime settings and timezones (I think
the person how originally found the bug was in New Zealand and PG got
confused by a +13 timezone) - don't know if this might affect you or if
it was fixed before 7.0.2

You might want to try the to_char function and see if that displays the
same problem.

- Richard Huxton



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-03-31 07:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28 10:52 date_part bug? Salvador Mainé <salvamaine@yahoo.com>
2001-03-31 07:35 ` Richard Huxton <dev@archonet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox