Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f56dc3

Browse files
committed
Secondary patch to fix interval to_char() for "HH" where hours >= 12.
1 parentc3a24e3 commit4f56dc3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/utils/adt/formatting.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.164 2010/02/2301:42:19 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.165 2010/02/2306:29:01 momjian Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2010, PostgreSQL Global Development Group
@@ -2089,7 +2089,8 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out)
20892089
caseDCH_HH:
20902090
caseDCH_HH12:
20912091
sprintf(s,"%0*d",S_FM(n->suffix) ?0 :2,
2092-
!is_interval&&tm->tm_hour % (HOURS_PER_DAY /2)==0 ?
2092+
is_interval ?tm->tm_hour :
2093+
tm->tm_hour % (HOURS_PER_DAY /2)==0 ?
20932094
12 :tm->tm_hour % (HOURS_PER_DAY /2));
20942095
if (S_THth(n->suffix))
20952096
str_numth(s,s,S_TH_TYPE(n->suffix));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp