Index: src/backend/utils/adt/formatting.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v
retrieving revision 1.164
diff -c -c -r1.164 formatting.c
*** src/backend/utils/adt/formatting.c	23 Feb 2010 01:42:19 -0000	1.164
--- src/backend/utils/adt/formatting.c	23 Feb 2010 06:25:59 -0000
***************
*** 2089,2095 ****
  			case DCH_HH:
  			case DCH_HH12:
  				sprintf(s, "%0*d", S_FM(n->suffix) ? 0 : 2,
! 						!is_interval && tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ?
  						12 : tm->tm_hour % (HOURS_PER_DAY / 2));
  				if (S_THth(n->suffix))
  					str_numth(s, s, S_TH_TYPE(n->suffix));
--- 2089,2096 ----
  			case DCH_HH:
  			case DCH_HH12:
  				sprintf(s, "%0*d", S_FM(n->suffix) ? 0 : 2,
! 						is_interval ? tm->tm_hour :
! 						tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ?
  						12 : tm->tm_hour % (HOURS_PER_DAY / 2));
  				if (S_THth(n->suffix))
  					str_numth(s, s, S_TH_TYPE(n->suffix));
