1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

Merge pull request #11856 from xtopherwong/new-time-zone-list

Use new time zone list
This commit is contained in:
Lennart Poettering 2019-02-28 18:57:26 +01:00 committed by GitHub
commit 04d7ca0228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

1
README
View File

@ -158,6 +158,7 @@ REQUIREMENTS:
openssl >= 1.1.0 (optional, required to support DNS-over-TLS with openssl)
elfutils >= 158 (optional)
polkit (optional)
tzdata >= 2014f (optional)
pkg-config
gperf
docbook-xsl (optional, required for documentation)

View File

@ -1214,7 +1214,7 @@ int get_timezones(char ***ret) {
n_allocated = 2;
n_zones = 1;
f = fopen("/usr/share/zoneinfo/zone.tab", "re");
f = fopen("/usr/share/zoneinfo/zone1970.tab", "re");
if (f) {
for (;;) {
_cleanup_free_ char *line = NULL;

View File

@ -4,6 +4,7 @@
#include "serialize.h"
#include "string-util.h"
#include "strv.h"
#include "tests.h"
#include "time-util.h"
static void test_parse_sec(void) {
@ -260,8 +261,10 @@ static void test_get_timezones(void) {
r = get_timezones(&zones);
assert_se(r == 0);
STRV_FOREACH(zone, zones)
STRV_FOREACH(zone, zones) {
log_info("zone: %s", *zone);
assert_se(timezone_is_valid(*zone, LOG_ERR));
}
}
static void test_usec_add(void) {
@ -481,7 +484,7 @@ static void test_in_utc_timezone(void) {
}
int main(int argc, char *argv[]) {
uintmax_t x;
test_setup_logging(LOG_INFO);
log_info("realtime=" USEC_FMT "\n"
"monotonic=" USEC_FMT "\n"
@ -513,7 +516,7 @@ int main(int argc, char *argv[]) {
assert_cc((time_t) -1 < (time_t) 1);
/* Ensure TIME_T_MAX works correctly */
x = (uintmax_t) TIME_T_MAX;
uintmax_t x = TIME_T_MAX;
x++;
assert((time_t) x < 0);