PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | pg_tm |
Macros | |
#define | TZ_STRLEN_MAX 255 |
Typedefs | |
typedef int64 | pg_time_t |
typedef struct pg_tz | pg_tz |
typedef struct pg_tzenum | pg_tzenum |
Functions | |
struct pg_tm * | pg_localtime (const pg_time_t *timep, const pg_tz *tz) |
struct pg_tm * | pg_gmtime (const pg_time_t *timep) |
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) |
bool | pg_interpret_timezone_abbrev (const char *abbrev, const pg_time_t *timep, long int *gmtoff, int *isdst, const pg_tz *tz) |
bool | pg_get_timezone_offset (const pg_tz *tz, long int *gmtoff) |
const char * | pg_get_timezone_name (pg_tz *tz) |
bool | pg_tz_acceptable (pg_tz *tz) |
size_t | pg_strftime (char *s, size_t maxsize, const char *format, const struct pg_tm *t) |
void | pg_timezone_initialize (void) |
pg_tz * | pg_tzset (const char *tzname) |
pg_tz * | pg_tzset_offset (long gmtoffset) |
pg_tzenum * | pg_tzenumerate_start (void) |
pg_tz * | pg_tzenumerate_next (pg_tzenum *dir) |
void | pg_tzenumerate_end (pg_tzenum *dir) |
Variables | |
PGDLLIMPORT pg_tz * | session_timezone |
PGDLLIMPORT pg_tz * | log_timezone |
const char* pg_get_timezone_name | ( | pg_tz * | tz | ) |
Definition at line 1875 of file localtime.c.
References pg_tz::TZname.
Referenced by show_log_timezone(), show_timezone(), and timetz_at_local().
bool pg_get_timezone_offset | ( | const pg_tz * | tz, |
long int * | gmtoff | ||
) |
Definition at line 1851 of file localtime.c.
References i, pg_tz::state, ttinfo::tt_utoff, state::ttis, and state::typecnt.
Referenced by DecodeTimeOnly(), and TimestampTimestampTzRequiresRewrite().
Definition at line 1389 of file localtime.c.
Referenced by AddFileToBackupManifest(), and GetEpochTime().
bool pg_interpret_timezone_abbrev | ( | const char * | abbrev, |
const pg_time_t * | timep, | ||
long int * | gmtoff, | ||
int * | isdst, | ||
const pg_tz * | tz | ||
) |
Definition at line 1757 of file localtime.c.
References state::charcnt, charcnt, state::chars, i, pg_tz::state, state::timecnt, ttinfo::tt_desigidx, ttinfo::tt_isdst, ttinfo::tt_utoff, state::ttis, and state::types.
Referenced by DetermineTimeZoneAbbrevOffsetInternal().
Definition at line 1344 of file localtime.c.
References localsub(), pg_tz::state, and tm.
Referenced by build_backup_content(), get_formatted_log_time(), get_formatted_start_time(), log_status_format(), logfile_getname(), score_timezone(), set_next_rotation_time(), str_time(), timeofday(), and timestamp2tm().
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 | ||
) |
Definition at line 1610 of file localtime.c.
References state::ats, AVGSECSPERYEAR, state::goahead, state::goback, i, j, pg_next_dst_boundary(), pg_tz::state, state::timecnt, ttinfo::tt_isdst, ttinfo::tt_utoff, state::ttis, state::typecnt, state::types, and YEARSPERREPEAT.
Referenced by DetermineTimeZoneOffsetInternal(), and pg_next_dst_boundary().
size_t pg_strftime | ( | char * | s, |
size_t | maxsize, | ||
const char * | format, | ||
const struct pg_tm * | t | ||
) |
Definition at line 128 of file strftime.c.
References _fmt(), EOVERFLOW, format, and IN_NONE.
Referenced by AddFileToBackupManifest(), build_backup_content(), get_formatted_log_time(), get_formatted_start_time(), log_status_format(), logfile_getname(), str_time(), and timeofday().
void pg_timezone_initialize | ( | void | ) |
Definition at line 361 of file pgtz.c.
References log_timezone, pg_tzset(), and session_timezone.
Referenced by InitializeGUCOptions().
bool pg_tz_acceptable | ( | pg_tz * | tz | ) |
Definition at line 1890 of file localtime.c.
Referenced by check_log_timezone(), check_timezone(), pg_tzenumerate_next(), score_timezone(), and validate_zone().
void pg_tzenumerate_end | ( | pg_tzenum * | dir | ) |
Definition at line 414 of file pgtz.c.
References pg_tzenum::depth, pg_tzenum::dirdesc, pg_tzenum::dirname, FreeDir(), and pfree().
Definition at line 426 of file pgtz.c.
References AllocateDir(), pg_tzenum::baselen, dirent::d_name, pg_tzenum::depth, pg_tzenum::dirdesc, pg_tzenum::dirname, ereport, errcode_for_file_access(), errmsg(), errmsg_internal(), ERROR, FreeDir(), get_dirent_type(), MAX_TZDIR_DEPTH, MAXPGPATH, pfree(), pg_tz_acceptable(), PGFILETYPE_DIR, pstrdup(), ReadDir(), snprintf, pg_tz::state, strlcpy(), pg_tzenum::tz, tzload(), and pg_tz::TZname.
pg_tzenum* pg_tzenumerate_start | ( | void | ) |
Definition at line 397 of file pgtz.c.
References AllocateDir(), pg_tzenum::baselen, pg_tzenum::depth, pg_tzenum::dirdesc, pg_tzenum::dirname, ereport, errcode_for_file_access(), errmsg(), ERROR, palloc0(), pg_TZDIR(), and pstrdup().
pg_tz* pg_tzset | ( | const char * | tzname | ) |
Definition at line 234 of file pgtz.c.
References elog, ERROR, HASH_ENTER, HASH_FIND, hash_search(), init_timezone_hashtable(), pg_toupper(), pg_tz::state, timezone_cache, pg_tz_cache::tz, TZ_STRLEN_MAX, tzload(), pg_tz::TZname, and tzparse().
Referenced by check_log_timezone(), check_timezone(), DecodeDateTime(), DecodeTimeOnly(), DecodeTimezoneName(), FetchDynamicTimeZone(), pg_timezone_initialize(), and pg_tzset_offset().
pg_tz* pg_tzset_offset | ( | long | gmtoffset | ) |
Definition at line 320 of file pgtz.c.
References pg_tzset(), SECS_PER_HOUR, SECS_PER_MINUTE, and snprintf.
Referenced by check_timezone(), and DecodeTimezoneNameToTz().
|
extern |
Definition at line 31 of file pgtz.c.
Referenced by assign_log_timezone(), build_backup_content(), get_formatted_log_time(), get_formatted_start_time(), log_status_format(), logfile_getname(), pg_timezone_initialize(), set_next_rotation_time(), show_log_timezone(), and str_time().
|
extern |
Definition at line 28 of file pgtz.c.
Referenced by assign_timezone(), date2timestamptz_opt_overflow(), DecodeDateTime(), DecodeTimeOnly(), executeDateTimeMethod(), generate_series_timestamptz_internal(), GetCurrentTimeUsec(), pg_timezone_initialize(), show_timezone(), time_timetz(), timeofday(), timestamp2timestamptz_opt_overflow(), timestamp2tm(), TimestampTimestampTzRequiresRewrite(), timestamptz_pl_interval_internal(), timestamptz_trunc(), timetz_at_local(), and to_timestamp().