|
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 | WILDABBR " " |
| #define | TZDEFRULESTRING ",M3.2.0,M11.1.0" |
Enumerations | |
| enum | r_type { JULIAN_DAY , DAY_OF_YEAR , MONTH_NTH_DAY_OF_WEEK } |
Variables | |
| static const char | wildabbr [] = WILDABBR |
| static const char | gmt [] = "GMT" |
| static struct pg_tm | tm |
| static const int | mon_lengths [2][MONSPERYEAR] |
| static const int | year_lengths [2] |
Definition at line 61 of file localtime.c.
| #define WILDABBR " " |
Definition at line 48 of file localtime.c.
| Enumerator | |
|---|---|
| JULIAN_DAY | |
| DAY_OF_YEAR | |
| MONTH_NTH_DAY_OF_WEEK | |
Definition at line 65 of file localtime.c.
|
static |
Definition at line 118 of file localtime.c.
References fb(), i, result, and TWOS_COMPLEMENT.
Referenced by tzloadbody().
|
static |
Definition at line 144 of file localtime.c.
References fb(), i, result, and TWOS_COMPLEMENT.
Referenced by tzloadbody().
Definition at line 170 of file localtime.c.
References fb(), SECSPERREPEAT, SECSPERREPEAT_BITS, TYPE_BIT, and TYPE_SIGNED.
Referenced by tzloadbody().
|
static |
Definition at line 683 of file localtime.c.
Definition at line 754 of file localtime.c.
Definition at line 781 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 713 of file localtime.c.
References DAYSPERWEEK, fb(), getnum(), HOURSPERDAY, MINSPERHOUR, SECSPERHOUR, and SECSPERMIN.
Referenced by getoffset().
Definition at line 1248 of file localtime.c.
References fb(), gmt, tzload(), and tzparse().
Referenced by gmtsub().
|
static |
Definition at line 1360 of file localtime.c.
References state::chars, fb(), gmtload(), malloc, result, timesub(), state::tmp, and wildabbr.
Referenced by localsub(), and pg_gmtime().
Definition at line 1542 of file localtime.c.
Referenced by timesub().
|
static |
Definition at line 1560 of file localtime.c.
References j, TIME_T_MAX, TIME_T_MIN, and TYPE_SIGNED.
Referenced by tzparse().
Definition at line 108 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().
|
static |
Definition at line 1577 of file localtime.c.
References fb(), i, and lsinfo::ls_corr.
Referenced by tzloadbody().
Definition at line 1409 of file localtime.c.
References leaps_thru_end_of_nonneg(), and y.
Referenced by timesub().
|
static |
Definition at line 1262 of file localtime.c.
References AVGSECSPERYEAR, fb(), gmtsub(), i, localsub(), result, SECSPERREPEAT, timesub(), unconstify, and YEARSPERREPEAT.
Referenced by localsub(), and pg_localtime().
Definition at line 1939 of file localtime.c.
References state::chars, fb(), result, and pg_tz::state.
Referenced by pg_timezone_abbrevs_zone().
Definition at line 1992 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 1968 of file localtime.c.
References fb(), i, pg_tz::state, ttinfo::tt_utoff, and state::ttis.
Referenced by DecodeTimeOnly(), and TimestampTimestampTzRequiresRewrite().
Definition at line 1392 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 1746 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 1347 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 1613 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 1864 of file localtime.c.
References charcnt, state::chars, fb(), i, result, pg_tz::state, and ttinfo::tt_utoff.
Referenced by TimeZoneAbbrevIsKnown().
Definition at line 2007 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().
|
static |
Definition at line 1417 of file localtime.c.
References corr, DAYSPERLYEAR, DAYSPERNYEAR, DAYSPERWEEK, EOVERFLOW, EPOCH_WDAY, EPOCH_YEAR, fb(), i, increment_overflow(), isleap, leaps_thru_end_of(), mon_lengths, SECSPERDAY, SECSPERHOUR, SECSPERMIN, pg_tm::tm_gmtoff, 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, pg_tm::tm_yday, pg_tm::tm_year, TM_YEAR_BASE, TYPE_SIGNED, y, and year_lengths.
Referenced by gmtsub(), and localsub().
|
static |
Definition at line 842 of file localtime.c.
References DAY_OF_YEAR, DAYSPERWEEK, fb(), i, INITIALIZE, isleap, JULIAN_DAY, mon_lengths, MONTH_NTH_DAY_OF_WEEK, SECSPERDAY, and value.
Referenced by tzparse().
Definition at line 605 of file localtime.c.
References a, b, fb(), and result.
Referenced by tzloadbody().
Definition at line 589 of file localtime.c.
References err(), fb(), free, malloc, name, and tzloadbody().
Referenced by gmtload(), pg_load_tz(), pg_tzenumerate_next(), and pg_tzset().
|
static |
Definition at line 212 of file localtime.c.
References state::ats, state::charcnt, charcnt, state::chars, close, corr, desigidx, detzcode(), detzcode64(), differ_by_repeat(), err(), fb(), i, j, leapcnt, leapcorr(), name, pg_open_tzfile(), read, SECSPERDAY, TIME_T_MAX, TIME_T_MIN, state::timecnt, timecnt, ttinfo::tt_desigidx, ttinfo::tt_ttisstd, ttinfo::tt_ttisut, ttinfo::tt_utoff, state::ttis, TYPE_SIGNED, state::typecnt, typecnt, state::types, typesequiv(), TZ_MAX_CHARS, TZ_MAX_LEAPS, TZ_MAX_TIMES, TZ_MAX_TYPES, TZDEFAULT, and tzparse().
Referenced by tzload().
Definition at line 939 of file localtime.c.
References charcnt, EPOCH_YEAR, fb(), getoffset(), getqzname(), getrule(), getzname(), i, increment_overflow_time(), init_ttinfo(), isleap, j, memcpy(), name, SECSPERDAY, SECSPERHOUR, start, timecnt, transtime(), TZ_MAX_TIMES, TZDEFRULESTRING, year_lengths, and YEARSPERREPEAT.
Referenced by gmtload(), pg_load_tz(), pg_tzset(), and tzloadbody().
Definition at line 53 of file localtime.c.
Referenced by gbt_tstz_compress(), and gmtload().
|
static |
Definition at line 629 of file localtime.c.
Referenced by timesub(), and transtime().
|
static |
Definition at line 104 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 51 of file localtime.c.
Referenced by gmtsub().
Definition at line 634 of file localtime.c.