|
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_timezone_abbrev_is_known (const char *abbrev, bool *isfixed, long int *gmtoff, int *isdst, const pg_tz *tz) |
| const char * | pg_get_next_timezone_abbrev (int *indx, 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_next_timezone_abbrev | ( | int * | indx, |
| const pg_tz * | tz | ||
| ) |
Definition at line 1937 of file localtime.c.
References state::charcnt, state::chars, and pg_tz::state.
Referenced by pg_timezone_abbrevs_zone().
| const char * pg_get_timezone_name | ( | pg_tz * | tz | ) |
Definition at line 1990 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 1966 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 1390 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 1744 of file localtime.c.
References state::charcnt, charcnt, state::chars, state::defaulttype, i, pg_tz::state, state::timecnt, ttinfo::tt_desigidx, ttinfo::tt_isdst, ttinfo::tt_utoff, state::ttis, and state::types.
Referenced by DetermineTimeZoneAbbrevOffsetInternal(), and pg_timezone_abbrevs_zone().
Definition at line 1345 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(), pg_tz_acceptable(), 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 1611 of file localtime.c.
References state::ats, AVGSECSPERYEAR, state::defaulttype, state::goahead, state::goback, i, j, pg_next_dst_boundary(), pg_tz::state, state::timecnt, ttinfo::tt_isdst, ttinfo::tt_utoff, state::ttis, 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().
| bool pg_timezone_abbrev_is_known | ( | const char * | abbrev, |
| bool * | isfixed, | ||
| long int * | gmtoff, | ||
| int * | isdst, | ||
| const pg_tz * | tz | ||
| ) |
Definition at line 1862 of file localtime.c.
References state::charcnt, charcnt, state::chars, i, pg_tz::state, ttinfo::tt_desigidx, ttinfo::tt_isdst, ttinfo::tt_utoff, state::ttis, and state::typecnt.
Referenced by TimeZoneAbbrevIsKnown().
| 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 2005 of file localtime.c.
References pg_localtime(), POSTGRES_EPOCH_JDATE, SECS_PER_DAY, pg_tm::tm_sec, and UNIX_EPOCH_JDATE.
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_safe(), DecodeDateTime(), DecodeTimeOnly(), DecodeTimezoneAbbrev(), DecodeTimezoneAbbrevPrefix(), executeDateTimeMethod(), generate_series_timestamptz_internal(), GetCurrentTimeUsec(), pg_timezone_abbrevs_zone(), pg_timezone_initialize(), show_timezone(), time_timetz(), timeofday(), timestamp2timestamptz_safe(), timestamp2tm(), TimestampTimestampTzRequiresRewrite(), timestamptz_pl_interval_internal(), timestamptz_trunc(), timetz_at_local(), and to_timestamp().