|
PostgreSQL Source Code git master
|
#include "c.h"#include <fcntl.h>#include "datatype/timestamp.h"#include "pgtz.h"#include "private.h"#include "tzfile.h"
Go to the source code of this file.
Data Structures | |
| struct | rule |
| union | input_buffer |
| union | local_storage |
| struct | local_storage::file_analysis |
Macros | |
| #define | UNCONST(a) unconstify(char *, a) |
| #define | WILDABBR " " |
| #define | TZDEFRULESTRING ",M3.2.0,M11.1.0" |
| #define | WRONG (-1) |
Enumerations | |
| enum | r_type { JULIAN_DAY , DAY_OF_YEAR , MONTH_NTH_DAY_OF_WEEK } |
| enum | { TZLOAD_FROMENV = 1 } |
| enum | { TZLOAD_TZSTRING = 2 } |
| enum | { TZLOAD_TZDIR_SUB = 4 } |
Variables | |
| static const char | wildabbr [] = WILDABBR |
| static struct pg_tm | tm |
| static const int | mon_lengths [2][MONSPERYEAR] |
| static const int | year_lengths [2] |
Definition at line 67 of file localtime.c.
| #define UNCONST | ( | a | ) | unconstify(char *, a) |
Definition at line 33 of file localtime.c.
| #define WILDABBR " " |
Definition at line 55 of file localtime.c.
| #define WRONG (-1) |
Definition at line 1503 of file localtime.c.
| Enumerator | |
|---|---|
| JULIAN_DAY | |
| DAY_OF_YEAR | |
| MONTH_NTH_DAY_OF_WEEK | |
Definition at line 109 of file localtime.c.
|
static |
Definition at line 163 of file localtime.c.
References fb(), i, result, and TWO_31_MINUS_1.
Referenced by tzloadbody().
|
static |
Definition at line 187 of file localtime.c.
References fb(), i, result, and TWOS_COMPLEMENT.
Referenced by tzloadbody().
|
static |
Definition at line 689 of file localtime.c.
References fb(), is_digit(), max, and min.
Definition at line 761 of file localtime.c.
Definition at line 789 of file localtime.c.
References DAY_OF_YEAR, DAYSPERLYEAR, DAYSPERNYEAR, DAYSPERWEEK, fb(), getnum(), getoffset(), is_digit(), JULIAN_DAY, MONSPERYEAR, MONTH_NTH_DAY_OF_WEEK, and SECSPERHOUR.
Referenced by tzparse().
Definition at line 719 of file localtime.c.
References DAYSPERWEEK, fb(), getnum(), HOURSPERDAY, MINSPERHOUR, SECSPERHOUR, and SECSPERMIN.
Referenced by getoffset().
Definition at line 1172 of file localtime.c.
References fb(), and tzparse().
Referenced by gmtsub(), and pg_tzload().
|
static |
Definition at line 1302 of file localtime.c.
References fb(), gmtload(), malloc, result, timesub(), state::tmp, UNCONST, and wildabbr.
Referenced by localsub(), and pg_gmtime().
Definition at line 1511 of file localtime.c.
Referenced by tzparse().
|
static |
Definition at line 1533 of file localtime.c.
References fb(), j, TIME_T_MAX, TIME_T_MIN, and TYPE_SIGNED.
Referenced by tzloadbody(), and tzparse().
|
static |
Definition at line 152 of file localtime.c.
References desigidx, fb(), ttinfo::tt_desigidx, ttinfo::tt_isdst, ttinfo::tt_ttisstd, ttinfo::tt_ttisut, and ttinfo::tt_utoff.
Referenced by tzparse().
Definition at line 639 of file localtime.c.
Referenced by getnum(), getrule(), and getzname().
|
static |
Definition at line 1554 of file localtime.c.
References fb(), i, and leapcount().
Referenced by tzloadbody().
|
static |
Definition at line 73 of file localtime.c.
References fb().
Referenced by leapcorr(), timesub(), tzloadbody(), and tzparse().
Definition at line 1350 of file localtime.c.
References leaps_thru_end_of_nonneg(), and y.
Referenced by timesub().
|
static |
Definition at line 1186 of file localtime.c.
References AVGSECSPERYEAR, fb(), gmtsub(), i, localsub(), result, SECSPERREPEAT, timesub(), UNCONST, and YEARSPERREPEAT.
Referenced by localsub(), and pg_localtime().
|
static |
Definition at line 90 of file localtime.c.
References fb(), i, and unreachable.
Definition at line 1960 of file localtime.c.
References state::chars, fb(), result, and pg_tz::state.
Referenced by pg_timezone_abbrevs_zone().
Definition at line 2013 of file localtime.c.
References fb(), and pg_tz::TZname.
Referenced by pg_timezone_names(), show_log_timezone(), show_timezone(), and timetz_at_local().
Definition at line 1989 of file localtime.c.
References fb(), i, pg_tz::state, ttinfo::tt_utoff, and state::ttis.
Referenced by DecodeTimeOnly(), and TimestampTimestampTzRequiresRewrite().
Definition at line 1333 of file localtime.c.
References fb(), gmtsub(), and tm.
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 1767 of file localtime.c.
References charcnt, state::chars, fb(), i, and pg_tz::state.
Referenced by DetermineTimeZoneAbbrevOffsetInternal(), and pg_timezone_abbrevs_zone().
Definition at line 1289 of file localtime.c.
References fb(), 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 1634 of file localtime.c.
References AVGSECSPERYEAR, fb(), i, j, pg_next_dst_boundary(), result, pg_tz::state, ttinfo::tt_utoff, state::ttis, and YEARSPERREPEAT.
Referenced by DetermineTimeZoneOffsetInternal(), and pg_next_dst_boundary().
| bool pg_timezone_abbrev_is_known | ( | const char * | abbrev, |
| bool * | isfixed, | ||
| long int * | gmtoff, | ||
| int * | isdst, | ||
| const pg_tz * | tz | ||
| ) |
Definition at line 1885 of file localtime.c.
References charcnt, state::chars, fb(), i, result, pg_tz::state, and ttinfo::tt_utoff.
Referenced by TimeZoneAbbrevIsKnown().
Definition at line 2028 of file localtime.c.
References fb(), pg_localtime(), POSTGRES_EPOCH_JDATE, SECS_PER_DAY, and UNIX_EPOCH_JDATE.
Referenced by check_log_timezone(), check_timezone(), pg_tzenumerate_next(), score_timezone(), and validate_zone().
Definition at line 1590 of file localtime.c.
References fb(), gmtload(), name, tzload(), TZLOAD_TZSTRING, and tzparse().
Referenced by pg_load_tz(), pg_tzenumerate_next(), and pg_tzset().
|
static |
Definition at line 82 of file localtime.c.
Referenced by tzloadbody(), and tzparse().
|
static |
Definition at line 100 of file localtime.c.
Referenced by tzloadbody(), and tzparse().
|
static |
Definition at line 1358 of file localtime.c.
References corr, DAYSPERLYEAR, DAYSPERNYEAR, DAYSPERREPEAT, DAYSPERWEEK, EOVERFLOW, EPOCH_YEAR, fb(), i, isleap, leapcount(), leaps_thru_end_of(), lsinfo::ls_corr, mon_lengths, SECSPERDAY, SECSPERHOUR, SECSPERMIN, pg_tm::tm_hour, pg_tm::tm_isdst, pg_tm::tm_mday, pg_tm::tm_min, pg_tm::tm_mon, pg_tm::tm_sec, pg_tm::tm_wday, TM_WDAY_BASE, pg_tm::tm_yday, pg_tm::tm_year, TM_YEAR_BASE, TYPE_SIGNED, y, year_lengths, and YEARSPERREPEAT.
Referenced by gmtsub(), and localsub().
|
static |
Definition at line 850 of file localtime.c.
References DAY_OF_YEAR, DAYSPERWEEK, fb(), i, isleap, JULIAN_DAY, mon_lengths, MONTH_NTH_DAY_OF_WEEK, SECSPERDAY, unreachable, and value.
Referenced by tzparse().
|
static |
Definition at line 618 of file localtime.c.
References fb(), name, and tzloadbody().
Referenced by pg_tzload().
|
static |
Definition at line 261 of file localtime.c.
References state::ats, state::charcnt, charcnt, state::chars, CHARS_EXTRA, close, corr, desigidx, detzcode(), detzcode64(), EINVAL, err(), fb(), state::goahead, i, increment_overflow_time(), j, leapcnt, leapcorr(), leapcount(), lsinfo::ls_trans, memcpy(), name, pg_open_tzfile(), read, set_leapcount(), set_lsinfo(), TIME_T_MAX, TIME_T_MIN, state::timecnt, timecnt, ttinfo::tt_desigidx, ttinfo::tt_ttisstd, ttinfo::tt_ttisut, state::ttis, TWO_31_MINUS_1, TYPE_SIGNED, state::typecnt, typecnt, state::types, TZ_MAX_CHARS, TZ_MAX_LEAPS, TZ_MAX_TIMES, TZ_MAX_TYPES, TZ_RUNTIME_LEAPS, TZDEFAULT, TZLOAD_TZSTRING, and tzparse().
Referenced by tzload().
Definition at line 949 of file localtime.c.
References charcnt, EPOCH_YEAR, fb(), getoffset(), getqzname(), getrule(), getzname(), i, increment_overflow(), increment_overflow_time(), init_ttinfo(), isleap, leapcount(), lsinfo::ls_trans, memcpy(), name, SECSPERDAY, SECSPERHOUR, set_leapcount(), set_lsinfo(), start, TIME_T_MIN, timecnt, transtime(), TZ_MAX_TIMES, TZDEFRULESTRING, TZNAME_MAXIMUM, year_lengths, years_of_observations, and YEARSPERREPEAT.
Referenced by gmtload(), pg_tzload(), and tzloadbody().
|
static |
Definition at line 628 of file localtime.c.
Referenced by timesub(), and transtime().
|
static |
Definition at line 148 of file localtime.c.
Referenced by abstime2tm(), AdjustFractDays(), AdjustFractSeconds(), AppendTimestampSeconds(), build_time_t(), cache_locale_time(), check_recovery_target_time(), ClearPgTm(), createBackupLabel(), date2timestamptz_safe(), date_in(), date_out(), DCH_to_char(), DecodeDate(), DecodeDate(), DecodeDateTime(), DecodeDateTime(), DecodeInterval(), DecodeISO8601Interval(), DecodeNumber(), DecodeNumber(), DecodeNumberField(), DecodeNumberField(), DecodeTime(), DecodeTime(), DecodeTimeOnly(), DetermineTimeZoneAbbrevOffset(), DetermineTimeZoneAbbrevOffsetTS(), DetermineTimeZoneOffset(), DetermineTimeZoneOffsetInternal(), do_to_timestamp(), dttofmtasc_replace(), EncodeDateOnly(), EncodeDateOnly(), EncodeDateTime(), EncodeDateTime(), EncodeInterval(), EncodeTimeOnly(), executeDateTimeMethod(), gbt_num_compress(), get_timezone_offset(), GetCurrentDateTime(), GetCurrentDateTime(), GetCurrentTimeUsec(), GetEpochTime(), GetEpochTime(), GetSQLCurrentDate(), GetSQLCurrentTime(), GetSQLLocalTime(), identify_system_timezone(), interval2tm(), interval_part_common(), interval_to_char(), interval_trunc(), JsonEncodeDateTime(), llvm_create_jit_instance(), locale_date_order(), main(), make_date(), make_output_dirs(), make_timestamp_internal(), map_sql_value_to_xml_value(), my_strftime(), parse_datetime(), parse_sane_timezone(), pg_get_role_ddl_internal(), pg_gmtime(), pg_localtime(), pg_timezone_names(), PGTYPESdate_defmt_asc(), PGTYPESdate_fmt_asc(), PGTYPESdate_from_asc(), PGTYPESdate_to_asc(), PGTYPESdate_today(), PGTYPESinterval_from_asc(), PGTYPESinterval_to_asc(), PGTYPEStimestamp_add_interval(), PGTYPEStimestamp_current(), PGTYPEStimestamp_defmt_scan(), PGTYPEStimestamp_fmt_asc(), PGTYPEStimestamp_from_asc(), PGTYPEStimestamp_to_asc(), pqTraceFormatTimestamp(), ReadHead(), score_timezone(), set_next_rotation_time(), SetEpochTimestamp(), SetEpochTimestamp(), tarOpen(), time2tm(), time_in(), time_out(), time_part_common(), time_t_to_timestamptz(), time_timetz(), timeofday(), timestamp2date_safe(), timestamp2timestamptz_safe(), timestamp2tm(), timestamp2tm(), timestamp_age(), timestamp_in(), timestamp_out(), timestamp_part_common(), timestamp_pl_interval(), timestamp_recv(), timestamp_time(), timestamp_to_char(), timestamp_trunc(), timestamp_zone(), timestamptz2date_safe(), timestamptz2timestamp_safe(), timestamptz_age(), timestamptz_in(), timestamptz_out(), timestamptz_part_common(), timestamptz_pl_interval_internal(), timestamptz_recv(), timestamptz_time(), timestamptz_timetz(), timestamptz_to_char(), timestamptz_to_str(), timestamptz_trunc_internal(), timestamptz_zone(), timetz2tm(), timetz_in(), timetz_out(), timetz_part_common(), timetz_zone(), tm2interval(), tm2time(), tm2timestamp(), tm2timestamp(), tm2timetz(), to_date(), to_timestamp(), typenameTypeMod(), ValidateDate(), WriteHead(), and writezone().
Definition at line 58 of file localtime.c.
Referenced by gmtsub().
Definition at line 633 of file localtime.c.