|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <fcntl.h>#include <sys/stat.h>#include <time.h>#include <unistd.h>#include "pgtz.h"
Go to the source code of this file.
Data Structures | |
| struct | tztry |
Macros | |
| #define | T_DAY ((time_t) (60*60*24)) |
| #define | T_WEEK ((time_t) (60*60*24*7)) |
| #define | T_MONTH ((time_t) (60*60*24*31)) |
| #define | MAX_TEST_TIMES (52*100) /* 100 years */ |
Functions | |
| const char * | select_default_timezone (const char *share_path) |
| static const char * | pg_TZDIR (void) |
| int | pg_open_tzfile (const char *name, char *canonname) |
| static pg_tz * | pg_load_tz (const char *name) |
| static bool | check_system_link_file (const char *linkname, struct tztry *tt, char *bestzonename) |
| static void | scan_available_timezones (char *tzdir, char *tzdirsub, struct tztry *tt, int *bestscore, char *bestzonename) |
| static int | get_timezone_offset (struct tm *tm) |
| static time_t | build_time_t (int year, int month, int day) |
| static bool | compare_tm (struct tm *s, struct pg_tm *p) |
| static int | score_timezone (const char *tzname, struct tztry *tt) |
| static bool | perfect_timezone_match (const char *tzname, struct tztry *tt) |
| static const char * | identify_system_timezone (void) |
| static int | zone_name_pref (const char *zonename) |
| static bool | validate_zone (const char *tzname) |
Variables | |
| static char | tzdirpath [MAXPGPATH] |
Definition at line 156 of file findtimezone.c.
Definition at line 152 of file findtimezone.c.
Definition at line 154 of file findtimezone.c.
Definition at line 153 of file findtimezone.c.
Definition at line 190 of file findtimezone.c.
References fb(), tm, pg_tm::tm_isdst, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by identify_system_timezone().
|
static |
Definition at line 544 of file findtimezone.c.
References fb(), fprintf, len, MAXPGPATH, perfect_timezone_match(), readlink, and TZ_STRLEN_MAX.
Referenced by identify_system_timezone().
Definition at line 207 of file findtimezone.c.
References 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, and pg_tm::tm_year.
Referenced by score_timezone().
Definition at line 175 of file findtimezone.c.
References TIMEZONE_GLOBAL, tm, and pg_tm::tm_gmtoff.
Referenced by identify_system_timezone().
Definition at line 331 of file findtimezone.c.
References build_time_t(), check_system_link_file(), fb(), fprintf, get_timezone_offset(), MAX_TEST_TIMES, MAXPGPATH, pg_TZDIR(), scan_available_timezones(), score_timezone(), snprintf, strlcpy(), T_DAY, T_MONTH, T_WEEK, tm, pg_tm::tm_isdst, pg_tm::tm_year, and TZ_STRLEN_MAX.
Referenced by select_default_timezone().
Definition at line 320 of file findtimezone.c.
References fb(), and score_timezone().
Referenced by check_system_link_file().
Definition at line 91 of file findtimezone.c.
References fb(), name, pg_tz::state, TZ_STRLEN_MAX, tzload(), pg_tz::TZname, and tzparse().
Referenced by score_timezone(), and validate_zone().
Definition at line 65 of file findtimezone.c.
References fb(), MAXPGPATH, name, PG_BINARY, pg_TZDIR(), strlcpy(), and TZ_STRLEN_MAX.
Referenced by tzloadbody().
Definition at line 37 of file findtimezone.c.
References fb(), and tzdirpath.
Referenced by identify_system_timezone(), and pg_open_tzfile().
|
static |
Definition at line 657 of file findtimezone.c.
References fb(), fprintf, MAXPGPATH, name, pgfnames(), pgfnames_cleanup(), S_ISDIR, scan_available_timezones(), score_timezone(), snprintf, stat, strlcpy(), TZ_STRLEN_MAX, and zone_name_pref().
Referenced by identify_system_timezone(), and scan_available_timezones().
Definition at line 234 of file findtimezone.c.
References compare_tm(), fb(), fprintf, i, pg_load_tz(), pg_localtime(), pg_tz_acceptable(), tm, and TZ_STRLEN_MAX.
Referenced by identify_system_timezone(), perfect_timezone_match(), and scan_available_timezones().
Definition at line 1757 of file findtimezone.c.
References fb(), identify_system_timezone(), share_path, snprintf, tzdirpath, and validate_zone().
Referenced by test_config_settings().
Definition at line 1728 of file findtimezone.c.
References fb(), pg_load_tz(), and pg_tz_acceptable().
Referenced by select_default_timezone().
Definition at line 615 of file findtimezone.c.
References fb().
Referenced by scan_available_timezones().
Definition at line 27 of file findtimezone.c.
Referenced by pg_TZDIR(), and select_default_timezone().