summary refs log tree commit diff
path: root/time/tzfile.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2015-11-17 11:43:49 +0100
committerAndreas Schwab <schwab@suse.de>2016-01-11 16:42:25 +0100
commitc83196b0df4340209f260ffaf90e787c711c268e (patch)
tree481d023bf3a8ef8ad6e9ff64846c2f34aac6883e /time/tzfile.c
parent97ee300903cdc0a0052d09ed7c3f7779a303d625 (diff)
downloadglibc-c83196b0df4340209f260ffaf90e787c711c268e.tar.gz
glibc-c83196b0df4340209f260ffaf90e787c711c268e.tar.xz
glibc-c83196b0df4340209f260ffaf90e787c711c268e.zip
Force rereading TZDEFRULES after it was used to set DST rules only (bug #19253)
If the TZDEFRULES file was used to set the DST rules when $TZ didn't
provide any we need to make sure that the next time it is used we
recompute everything as __tzfile_default changes some setting from what is
provided by TZDEFRULES.
Diffstat (limited to 'time/tzfile.c')
-rw-r--r--time/tzfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index 992806dc6b..9049878399 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -628,6 +628,12 @@ __tzfile_default (const char *std, const char *dst,
   __timezone = -types[0].offset;
 
   compute_tzname_max (stdlen + dstlen);
+
+  /* Invalidate the tzfile attribute cache to force rereading
+     TZDEFRULES the next time it is used.  */
+  tzfile_dev = 0;
+  tzfile_ino = 0;
+  tzfile_mtime = 0;
 }
 
 void