summaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorBruce Momjian2005-07-21 05:18:26 +0000
committerBruce Momjian2005-07-21 05:18:26 +0000
commitb4bdab8105b4057032891e5d5f4d080d9d9ce38c (patch)
tree527c52ee4818efd2ec3e5f26b66577f2f67f131a /src/interfaces
parentaa0f6e8d06b4c172481464eabc7d7a98d6fb5b6f (diff)
Fix integer timestamp build for macro changes.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index 4d7ede931c8..3fa176be84e 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -717,9 +717,9 @@ tm2interval(struct tm *tm, fsec_t fsec, interval *span)
{
span->month = tm->tm_year * MONTHS_PER_YEAR + tm->tm_mon;
#ifdef HAVE_INT64_TIMESTAMP
- span->time = (((((((tm->tm_mday * INT64CONST(HOURS_PER_DAY)) +
- tm->tm_hour) * INT64CONST(SECS_PER_MINUTE)) +
- tm->tm_min) * INT64CONST(SECS_PER_MINUTE)) +
+ span->time = (((((((tm->tm_mday * INT64CONST(24)) +
+ tm->tm_hour) * INT64CONST(60)) +
+ tm->tm_min) * INT64CONST(60)) +
tm->tm_sec) * USECS_PER_SEC) + fsec;
#else
span->time = (((((tm->tm_mday * (double)HOURS_PER_DAY) +