diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index 99bdc94d6d..c46403b809 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -1804,8 +1804,6 @@ DecodeDateTime(char **field, int *ftype, int nf,
 	*fsec = 0;
 	/* don't know daylight savings time status apriori */
 	tm->tm_isdst = -1;
-	if (tzp != NULL)
-		*tzp = 0;
 
 	for (i = 0; i < nf; i++)
 	{
@@ -1822,9 +1820,6 @@ DecodeDateTime(char **field, int *ftype, int nf,
 					char	   *cp;
 					int			jday;
 
-					if (tzp == NULL)
-						return -1;
-
 					jday = strtoint(field[i], &cp, 10);
 					if (*cp != '-')
 						return -1;
@@ -1847,10 +1842,6 @@ DecodeDateTime(char **field, int *ftype, int nf,
 				else if (((fmask & DTK_DATE_M) == DTK_DATE_M)
 						 || (ptype != 0))
 				{
-					/* No time zone accepted? Then quit... */
-					if (tzp == NULL)
-						return -1;
-
 					if (isdigit((unsigned char) *field[i]) || ptype != 0)
 					{
 						char	   *cp;
@@ -1924,9 +1915,6 @@ DecodeDateTime(char **field, int *ftype, int nf,
 				{
 					int			tz;
 
-					if (tzp == NULL)
-						return -1;
-
 					if (DecodeTimezone(field[i], &tz) != 0)
 						return -1;
 
@@ -2173,8 +2161,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
 								tm->tm_hour = 0;
 								tm->tm_min = 0;
 								tm->tm_sec = 0;
-								if (tzp != NULL)
-									*tzp = 0;
+								*tzp = 0;
 								break;
 
 							default:
@@ -2207,8 +2194,6 @@ DecodeDateTime(char **field, int *ftype, int nf,
 						 */
 						tmask |= DTK_M(DTZ);
 						tm->tm_isdst = 1;
-						if (tzp == NULL)
-							return -1;
 						*tzp -= val;
 						break;
 
@@ -2220,16 +2205,12 @@ DecodeDateTime(char **field, int *ftype, int nf,
 						 */
 						tmask |= DTK_M(TZ);
 						tm->tm_isdst = 1;
-						if (tzp == NULL)
-							return -1;
 						*tzp = -val;
 						ftype[i] = DTK_TZ;
 						break;
 
 					case TZ:
 						tm->tm_isdst = 0;
-						if (tzp == NULL)
-							return -1;
 						*tzp = -val;
 						ftype[i] = DTK_TZ;
 						break;
@@ -2336,7 +2317,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
 		 * 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)))
+		if ((fmask & DTK_DATE_M) == DTK_DATE_M && !(fmask & DTK_M(TZ)) && (fmask & DTK_M(DTZMOD)))
 			return -1;
 	}
 
