1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Bring in a patch from Keith Parks to move the use of European dates

from a #define to a run-time option '-e'

Man page was updated to reflect new option
This commit is contained in:
Marc G. Fournier
1997-01-26 15:32:28 +00:00
parent ac3c926c42
commit 632c44d829
9 changed files with 108 additions and 46 deletions

View File

@ -19,6 +19,8 @@
#include <time.h>
#include <config.h>
#include <postgres.h>
#include <miscadmin.h>
#include <parser/sysfunc.h>
/*
@ -33,13 +35,13 @@ static char *Sysfunc_system_date(void)
time(&cur_time_secs);
cur_time_expanded = localtime(&cur_time_secs);
#if defined(EUROPEAN_DATES)
sprintf(buf, "%2.2d-%2.2d-%4.4d", cur_time_expanded->tm_mday,
if (EuroDates == 1)
sprintf(buf, "%2.2d-%2.2d-%4.4d", cur_time_expanded->tm_mday,
cur_time_expanded->tm_mon+1, cur_time_expanded->tm_year+1900);
#else
sprintf(buf, "%2.2d-%2.2d-%4.4d", cur_time_expanded->tm_mon+1,
else
sprintf(buf, "%2.2d-%2.2d-%4.4d", cur_time_expanded->tm_mon+1,
cur_time_expanded->tm_mday, cur_time_expanded->tm_year+1900);
#endif
return &buf[0];
}