aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/sysfunc.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-01-26 15:32:28 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-01-26 15:32:28 +0000
commit632c44d8290c0e3561b1c1851d4443868034a705 (patch)
tree4879c978ed1db82a57cc82c1aa5c91bfa5307662 /src/backend/parser/sysfunc.c
parentac3c926c4259690ed0c4cfab21db4c4b7ef05c11 (diff)
downloadpostgresql-632c44d8290c0e3561b1c1851d4443868034a705.tar.gz
postgresql-632c44d8290c0e3561b1c1851d4443868034a705.zip
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
Diffstat (limited to 'src/backend/parser/sysfunc.c')
-rw-r--r--src/backend/parser/sysfunc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/parser/sysfunc.c b/src/backend/parser/sysfunc.c
index 7cad3ab7ba5..18e3c5afe54 100644
--- a/src/backend/parser/sysfunc.c
+++ b/src/backend/parser/sysfunc.c
@@ -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];
}