We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentb8f8896 commitfc73264Copy full SHA for fc73264
src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -68,12 +68,12 @@ tm2timestamp(struct tm * tm, fsec_t fsec, int *tzp, timestamp *result)
68
dDate=date2j(tm->tm_year,tm->tm_mon,tm->tm_mday)-date2j(2000,1,1);
69
time=time2t(tm->tm_hour,tm->tm_min,tm->tm_sec,fsec);
70
#ifdefHAVE_INT64_TIMESTAMP
71
-*result= (date*INT64CONST(86400000000))+time;
+*result= (dDate*INT64CONST(86400000000))+time;
72
/* check for major overflow */
73
-if ((*result-time) /INT64CONST(86400000000)!=date)
+if ((*result-time) /INT64CONST(86400000000)!=dDate)
74
return-1;
75
/* check for just-barely overflow (okay except time-of-day wraps) */
76
-if ((*result<0) ? (date >=0) : (date<0))
+if ((*result<0) ? (dDate >=0) : (dDate<0))
77
78
#else
79
*result= ((dDate*86400)+time);