| From: | Bruce Momjian <bruce(at)momjian(dot)us> | 
|---|---|
| To: | Bruce Momjian <bruce(at)momjian(dot)us> | 
| Cc: | Dave Page <dpage(at)pgadmin(dot)org>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> | 
| Subject: | Re: to_char issue? | 
| Date: | 2010-02-23 01:59:04 | 
| Message-ID: | 201002230159.o1N1x4m10131@momjian.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
Bruce Momjian wrote:
> 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.
Oh, I should also mention that with the old code, 24 and 36 interval
hours would also return '12'.  :-(
-- 
  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. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jaime Casanova | 2010-02-23 04:15:08 | Fwd: [BUGS] BUG #5341: problema al iniciar pgadmin | 
| Previous Message | Bruce Momjian | 2010-02-23 01:44:05 | Re: to_char issue? |