Re: to_char issue?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: to_char issue?
Date: 2010-02-23 01:44:05
Message-ID: 201002230144.o1N1i5A07629@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dave Page wrote:
> This was posted as a documentation comment:
>
> to_char(interval '0d 0h 12m 44s', 'DD HH MI SS');
> with HH and HH12 will return 12 instead of 0.
>
> Testing on 8.4.1, it does seem to be the case that you get "00 12 12
> 44". Seems bogus to me, but am I and the OP missing something?

Fixed with the attached patch. I think HH and HH24 should be the same
for intervals. It is hard to explain why zero hours should show as
'12' for intervals.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 1004 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-02-23 01:59:04 Re: to_char issue?
Previous Message Jaime Mendieta 2010-02-23 01:42:30 BUG #5341: problema al iniciar pgadmin