Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca23837

Browse files
author
Thomas G. Lockhart
committed
Fix format to produce actual German style. Affects new "GERMAN" feature only.
1 parent ed14f88 commit ca23837

File tree

1 file changed

+6
-6
lines changed
  • src/backend/utils/adt

1 file changed

+6
-6
lines changed

src/backend/utils/adt/dt.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.46 1997/12/17 23:22:17 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.47 1997/12/23 19:26:31 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -4122,9 +4122,9 @@ EncodeDateOnly(struct tm * tm, int style, char *str)
41224122
case USE_GERMAN_DATES:
41234123
sprintf(str, "%02d.%02d", tm->tm_mday, tm->tm_mon);
41244124
if (tm->tm_year > 0)
4125-
sprintf((str + 5), "/%04d", tm->tm_year);
4125+
sprintf((str + 5), ".%04d", tm->tm_year);
41264126
else
4127-
sprintf((str + 5), "/%04d %s", -(tm->tm_year - 1), "BC");
4127+
sprintf((str + 5), ".%04d %s", -(tm->tm_year - 1), "BC");
41284128
break;
41294129

41304130
/* traditional date-only style for Postgres */
@@ -4274,12 +4274,12 @@ EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, cha
42744274
-(tm->tm_year - 1), tm->tm_hour, tm->tm_min, "BC");
42754275
break;
42764276

4277-
/* German variant on European style; note mixed delimiters dd.mm/yyyy */
4277+
/* German variant on European style */
42784278
case USE_GERMAN_DATES:
42794279
sprintf(str, "%02d.%02d", tm->tm_mday, tm->tm_mon);
42804280
if (tm->tm_year > 0)
42814281
{
4282-
sprintf((str + 5), "/%04d %02d:%02d:%05.2f",
4282+
sprintf((str + 5), ".%04d %02d:%02d:%05.2f",
42834283
tm->tm_year, tm->tm_hour, tm->tm_min, sec);
42844284

42854285
if ((*tzn != NULL) && (tm->tm_isdst >= 0))
@@ -4290,7 +4290,7 @@ EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, cha
42904290

42914291
}
42924292
else
4293-
sprintf((str + 5), "/%04d %02d:%02d %s",
4293+
sprintf((str + 5), ".%04d %02d:%02d %s",
42944294
-(tm->tm_year - 1), tm->tm_hour, tm->tm_min, "BC");
42954295
break;
42964296

0 commit comments

Comments
 (0)