From 7588bc5cef577cb3541bdb778de45d70b344b4ef Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 21 May 2007 07:04:00 +0000 Subject: [PATCH] Do not try to find local timezone in DecodeDateTime() because the result is not used anyway. This also fixes Vista's build problems. --- src/interfaces/ecpg/ChangeLog | 6 +++--- src/interfaces/ecpg/pgtypeslib/dt_common.c | 18 +++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index 32ba47d760..b866975d3f 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -2194,8 +2194,8 @@ Thu, 10 May 09:42:42 CEST 2007 - Synced parser and keyword list. - Renamed update test so it hopefully runs on Vista. -Th, 17 May 2007 22:03:40 +0200 +Sun, 20 May 2007 22:01:11 +0200 - - Removed mktime() call to hopefully get rid of some compatibility - problems. + - Do not try to find local timezone in DecodeDateTime() because the + result is not used anyway. This also fixes Vista's build problems. - Set ecpg version to 4.3.1. diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index 675f10abf1..f3ecf7fa74 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -2528,20 +2528,12 @@ DecodeDateTime(char **field, int *ftype, int nf, if (tm->tm_mday < 1 || tm->tm_mday > day_tab[isleap(tm->tm_year)][tm->tm_mon - 1]) return -1; - /* timezone not specified? then find local timezone if possible */ - if ((fmask & DTK_DATE_M) == DTK_DATE_M && tzp != NULL && !(fmask & DTK_M(TZ))) - { - /* - * daylight savings time modifier but no standard timezone? then - * error - */ - if (fmask & DTK_M(DTZMOD)) + /* backend tried to find local timezone here + * but we don't use the result afterwards anyway + * so we only check for this error: + * daylight savings time modifier but no standard timezone? */ + if ((fmask & DTK_DATE_M) == DTK_DATE_M && tzp != NULL && !(fmask & DTK_M(TZ)) && (fmask & DTK_M(DTZMOD))) return -1; - - /* test to see if this is the reason for the error on Vista - * doesn't seem to be used anyway - * *tzp = DetermineLocalTimeZone(tm); */ - } } return 0; -- 2.39.5