pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Bug in to_char()
2+ messages / 2 participants
[nested] [flat]

* Bug in to_char()
@ 2000-07-12 16:24  Brian Powell <brian@filogroup.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Brian Powell @ 2000-07-12 16:24 UTC (permalink / raw)
  To: pgsql-sql

Greetings,

Working with PostGreSQL 7.02, I found the following problem:

The AM/PM designator in the to_char function does not work proper for 13:00
and 12:00.

See the following:

test=> select to_char('3-12-2000 14:00'::timestamp, 'Dy, HH12:MI PM');
    to_char    
---------------
 Sun, 02:00 PM
(1 row)


This is correct.


test=> select to_char('3-12-2000 8:00'::timestamp, 'Dy, HH12:MI PM');
    to_char    
---------------
 Sun, 08:00 AM
(1 row)

This is correct.

test=> select to_char('3-12-2000 13:00'::timestamp, 'Dy, HH12:MI PM');
    to_char    
---------------
 Sun, 01:00 AM
(1 row)

NO!  This is incorrect

test=> select to_char('3-12-2000 1:00'::timestamp, 'Dy, HH12:MI PM');
    to_char    
---------------
 Sun, 01:00 AM
(1 row)

This is correctly 1 am.

nicklebys=> select to_char('3-12-2000 12:00'::timestamp, 'Dy, HH12:MI PM');
    to_char    
---------------
 Sun, 12:00 AM
(1 row)

NO!  This is 12:00 pm.  0:00 or 24:00 is 12:00 am.

Any known work arounds or bug fixes planned?

Thanks,
Brian

-- 
   +-----------------------------------------------------------+
   |  Brian Powell, President             brian@filogroup.com  |
   |  Filo Group                          www.filogroup.com    |
   |  One Broadway, Suite 300A            AIM: filogroupbrian  |
   |  Denver, CO  80203                   ICQ: 75037370        |
   |  303.733.3248 office                 303.733.7122 fax     |
   +-----------------------------------------------------------+





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

* Re: Bug in to_char()
@ 2000-07-13 08:56  Karel Zak <zakkr@zf.jcu.cz>
  parent: Brian Powell <brian@filogroup.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Karel Zak @ 2000-07-13 08:56 UTC (permalink / raw)
  To: Brian Powell <brian@filogroup.com>; +Cc: pgsql-sql


On Wed, 12 Jul 2000, Brian Powell wrote:

> Greetings,
> 
> Working with PostGreSQL 7.02, I found the following problem:

 PM/AM is already known bug and is already fixed in current CVS. In 7.1 it 
will correct.

				Karel 




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


end of thread, other threads:[~2000-07-13 08:56 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-12 16:24 Bug in to_char() Brian Powell <brian@filogroup.com>
2000-07-13 08:56 ` Karel Zak <zakkr@zf.jcu.cz>

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