-extern int interval2tm(Interval span, struct tm * tm, float8 *fsec);
-extern int tm2interval(struct tm * tm, double fsec, Interval *span);
+/*
+ * Prototypes for functions to deal with integer timestamps, when the native
+ * format is float timestamps.
+ */
+#ifndef HAVE_INT64_TIMESTAMP
+extern int64 GetCurrentIntegerTimestamp(void);
+extern TimestampTz IntegerTimestampToTimestampTz(int64 timestamp);
+#else
+#define GetCurrentIntegerTimestamp() GetCurrentTimestamp()
+#define IntegerTimestampToTimestampTz(timestamp) (timestamp)
+#endif
+
+extern TimestampTz time_t_to_timestamptz(pg_time_t tm);
+extern pg_time_t timestamptz_to_time_t(TimestampTz t);
+
+extern const char *timestamptz_to_str(TimestampTz t);
+
+extern int tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *dt);
+extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm * tm,
+ fsec_t *fsec, const char **tzn, pg_tz *attimezone);
+extern void dt2time(Timestamp dt, int *hour, int *min, int *sec, fsec_t *fsec);
+
+extern int interval2tm(Interval span, struct pg_tm * tm, fsec_t *fsec);
+extern int tm2interval(struct pg_tm * tm, fsec_t fsec, Interval *span);