From 109fef8208188ddf4be76d6899f7d8fde5b8b3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 22 Jul 2023 14:40:31 +0800 Subject: [PATCH] Use TZDIR for ZONEINFO_DIR if the variable is set. --- libmateweather/mateweather-timezone.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libmateweather/mateweather-timezone.c b/libmateweather/mateweather-timezone.c index 2754728..6c858c4 100644 --- a/libmateweather/mateweather-timezone.c +++ b/libmateweather/mateweather-timezone.c @@ -61,7 +61,7 @@ static gboolean parse_tzdata (const char *tzname, time_t start, time_t end, int *offset, gboolean *has_dst, int *dst_offset) { - char *filename, *contents; + char *tzdir, *filename, *contents; gsize length; int timecnt, transitions_size, ttinfo_map_size; int initial_transition = -1, second_transition = -1; @@ -71,7 +71,10 @@ parse_tzdata (const char *tzname, time_t start, time_t end, char initial_isdst, second_isdst; int i; - filename = g_build_filename (ZONEINFO_DIR, tzname, NULL); + tzdir = g_getenv("TZDIR"); + if (tzdir == NULL) + tzdir = ZONEINFO_DIR; + filename = g_build_filename (tzdir, tzname, NULL); if (!g_file_get_contents (filename, &contents, &length, NULL)) { g_free (filename); return FALSE; @@ -403,4 +406,3 @@ mateweather_timezone_get_dst_offset (MateWeatherTimezone *zone) g_return_val_if_fail (zone->has_dst, 0); return zone->dst_offset; } - -- 2.41.0 rm'>
path: root/gnu/services/ganeti.scm
AgeCommit message (Expand)Author
2020-10-28gnu: ganeti-luxid-service-type: Fix typo....* gnu/services/ganeti (ganeti-luxid-service-type)[description]: Fix spelling of "authoritative". Vagrant Cascadian
2020-10-10services: ganeti: Fix typo....* gnu/services/ganeti.scm (ganeti-luxid-service-type)[description]: Fix typo. Marius Bakke
2020-08-25services: ganeti-kvmd-service-type: Fix typo in description....* gnu/services/ganeti.scm (ganeti-kvmd-service-type)[description]: Fix typo. Tobias Geerinckx-Rice
2020-07-21services: ganeti: Fix erroneous gexp....* gnu/services/ganeti.scm (ganeti-watcher-command): Add missing parens. Marius Bakke
2020-07-19services: ganeti: Use TLS on the remote API by default....* gnu/services/ganeti.scm (<ganeti-rapi-configuration>): Set SSL? to #t. * gnu/tests/ganeti.scm (%ganeti-os): Set SSL? to #f. * doc/guix.texi (Virtualization Services): Adjust accordingly. Marius Bakke
2020-07-16services: Add ganeti....* gnu/services/ganeti.scm, gnu/tests/ganeti.scm: New files. * doc/guix.texi (Virtualization Services): Document the Ganeti services. Marius Bakke