1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Integrate src/timezone library for all platforms. There is more we can

and should do now that we control our own destiny for timezone handling,
but this commit gets the bulk of the picayune diffs in place.
Magnus Hagander and Tom Lane.
This commit is contained in:
Tom Lane
2004-05-21 05:08:06 +00:00
parent 260b513fc3
commit 63bd0db121
52 changed files with 1342 additions and 8101 deletions

View File

@@ -6,19 +6,19 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.36 2004/05/01 19:25:08 momjian Exp $
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.37 2004/05/21 05:08:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
#include <time.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include "fmgr.h"
#include "pgtime.h"
#ifdef HAVE_INT64_TIMESTAMP
#include "utils/int8.h"
#endif
@@ -251,16 +251,16 @@ extern Datum now(PG_FUNCTION_ARGS);
/* Internal routines (not fmgr-callable) */
extern int tm2timestamp(struct tm * tm, fsec_t fsec, int *tzp, Timestamp *dt);
extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm,
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, char **tzn);
extern void dt2time(Timestamp dt, int *hour, int *min, int *sec, fsec_t *fsec);
extern int interval2tm(Interval span, struct tm * tm, fsec_t *fsec);
extern int tm2interval(struct tm * tm, fsec_t fsec, Interval *span);
extern int interval2tm(Interval span, struct pg_tm * tm, fsec_t *fsec);
extern int tm2interval(struct pg_tm * tm, fsec_t fsec, Interval *span);
extern Timestamp SetEpochTimestamp(void);
extern void GetEpochTime(struct tm * tm);
extern void GetEpochTime(struct pg_tm * tm);
extern int timestamp_cmp_internal(Timestamp dt1, Timestamp dt2);
/* timestamp comparison works for timestamptz also */