pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: salva@ronincoders.com
Cc: pgsql-sql@postgresql.org
Subject: Re: date_part bug?
Date: Sat, 31 Mar 2001 08:35:35 +0100
Message-ID: <3AC588C7.9210F3AC@archonet.com> (raw)
References: <3AC1C27D.4D64E67E@yahoo.com>

"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



view thread (2+ messages)

Message-ID: <3AC588C7.9210F3AC@archonet.com>
Permalink:  ../3AC588C7.9210F3AC@archonet.com/
Also on:    postgresql.org/message-id/3AC588C7.9210F3AC@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, salva@ronincoders.com
  Subject: Re: date_part bug?
  In-Reply-To: <3AC588C7.9210F3AC@archonet.com>
  References: <3AC1C27D.4D64E67E@yahoo.com> <3AC588C7.9210F3AC@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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