1 /*-------------------------------------------------------------------------
4 * PostgreSQL internal timezone library
6 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
9 * $PostgreSQL: pgsql/src/include/pgtime.h,v 1.6 2004/12/31 22:03:19 pgsql Exp $
11 *-------------------------------------------------------------------------
18 * The API of this library is generally similar to the corresponding
19 * C library functions, except that we use pg_time_t which (we hope) is
20 * 64 bits wide, and which is most definitely signed not unsigned.
23 typedef int64 pg_time_t;
31 int tm_mon; /* origin 0, not 1 */
32 int tm_year; /* relative to 1900 */
40 extern struct pg_tm *pg_localtime(const pg_time_t *timep);
41 extern struct pg_tm *pg_gmtime(const pg_time_t *timep);
42 extern int pg_next_dst_boundary(const pg_time_t *timep,
43 long int *before_gmtoff,
46 long int *after_gmtoff,
48 extern size_t pg_strftime(char *s, size_t max, const char *format,
49 const struct pg_tm * tm);
51 extern void pg_timezone_initialize(void);
52 extern bool pg_tzset(const char *tzname);
53 extern bool tz_acceptable(void);
54 extern const char *select_default_timezone(void);
55 extern const char *pg_get_current_timezone(void);
57 #endif /* _PGTIME_H */