From patchwork Tue Nov 17 10:56:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 9694 Received: (qmail 33934 invoked by alias); 17 Nov 2015 10:56:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 33920 invoked by uid 89); 17 Nov 2015 10:56:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Force rereading TZDEFRULES after it was used to set DST rules only (bug #19253) X-Yow: I have no actual hairline... Date: Tue, 17 Nov 2015 11:56:43 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 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. Andreas. [BZ #19253] * time/tzfile.c (__tzfile_default): Invalidate tzfile attribute cache when TZDEFRULES was used. --- time/tzfile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/time/tzfile.c b/time/tzfile.c index 57abbb8..0e581f2 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