prepared for HAVE_INT64_TIMESTAMP. Per report from Guillaume Beaudoin.
if (doit)
{
/* Here we change from SQL to Unix sign convention */
+#ifdef HAVE_INT64_TIMESTAMP
+ CTimeZone = -(interval->time / USECS_PER_SEC);
+#else
CTimeZone = -interval->time;
+#endif
HasCTZSet = true;
}
{
Interval interval;
- interval. month = 0;
- interval. time = -CTimeZone;
+ interval.month = 0;
+#ifdef HAVE_INT64_TIMESTAMP
+ interval.time = -(CTimeZone * USECS_PER_SEC);
+#else
+ interval.time = -CTimeZone;
+#endif
tzn = DatumGetCString(DirectFunctionCall1(interval_out,
IntervalPGetDatum(&interval)));