mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 21:01:20 +02:00
Fix ancient bug in handling of to_char modifier 'TH', when used with HH.
In what seems like an oversight, we used to treat 'TH' the same as lowercase 'th', but only with HH/HH12.
This commit is contained in:
parent
9b27eab71c
commit
44886bd878
@ -1,7 +1,7 @@
|
|||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
* formatting.c
|
* formatting.c
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.158 2009/06/22 17:54:30 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.159 2009/07/06 19:11:39 heikki Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1999-2009, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1999-2009, PostgreSQL Global Development Group
|
||||||
@ -2094,7 +2094,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out)
|
|||||||
tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ? 12 :
|
tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ? 12 :
|
||||||
tm->tm_hour % (HOURS_PER_DAY / 2));
|
tm->tm_hour % (HOURS_PER_DAY / 2));
|
||||||
if (S_THth(n->suffix))
|
if (S_THth(n->suffix))
|
||||||
str_numth(s, s, 0);
|
str_numth(s, s, S_TH_TYPE(n->suffix));
|
||||||
s += strlen(s);
|
s += strlen(s);
|
||||||
break;
|
break;
|
||||||
case DCH_HH24:
|
case DCH_HH24:
|
||||||
|
Loading…
Reference in New Issue
Block a user