1/*-------------------------------------------------------------------------
4 * PostgreSQL internal timezone library
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
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.
26 * Data structure representing a broken-down timestamp.
28 * CAUTION: the IANA timezone library (src/timezone/) follows the POSIX
29 * convention that tm_mon counts from 0 and tm_year is relative to 1900.
30 * However, Postgres' datetime functions generally treat tm_mon as counting
31 * from 1 and tm_year as relative to 1 BC. Be sure to make the appropriate
32 * adjustments when moving from one code domain to the other.
49/* These structs are opaque outside the timezone library */
53/* Maximum length of a timezone name (not including trailing null) */
54 #define TZ_STRLEN_MAX 255
56/* these functions are in localtime.c */
61 long int *before_gmtoff,
64 long int *after_gmtoff,
83/* these functions are in strftime.c */
86 const struct pg_tm *t);
88/* these functions and variables are in pgtz.c */
101#endif /* _PGTIME_H */
pg_tz * pg_tzset_offset(long gmtoffset)
pg_tz * pg_tzenumerate_next(pg_tzenum *dir)
bool pg_tz_acceptable(pg_tz *tz)
bool pg_timezone_abbrev_is_known(const char *abbrev, bool *isfixed, long int *gmtoff, int *isdst, const pg_tz *tz)
int pg_next_dst_boundary(const pg_time_t *timep, long int *before_gmtoff, int *before_isdst, pg_time_t *boundary, long int *after_gmtoff, int *after_isdst, const pg_tz *tz)
const char * pg_get_timezone_name(pg_tz *tz)
void pg_timezone_initialize(void)
pg_tz * pg_tzset(const char *tzname)
bool pg_get_timezone_offset(const pg_tz *tz, long int *gmtoff)
const char * pg_get_next_timezone_abbrev(int *indx, const pg_tz *tz)
PGDLLIMPORT pg_tz * session_timezone
void pg_tzenumerate_end(pg_tzenum *dir)
size_t pg_strftime(char *s, size_t maxsize, const char *format, const struct pg_tm *t)
struct pg_tm * pg_localtime(const pg_time_t *timep, const pg_tz *tz)
PGDLLIMPORT pg_tz * log_timezone
pg_tzenum * pg_tzenumerate_start(void)
struct pg_tm * pg_gmtime(const pg_time_t *timep)
bool pg_interpret_timezone_abbrev(const char *abbrev, const pg_time_t *timep, long int *gmtoff, int *isdst, const pg_tz *tz)