From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A23C83858CDA; Mon, 8 Apr 2024 19:01:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A23C83858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712602909; bh=t6kt989lI/K62A/haphvAtiUPtylr8t2yzDT2zEISlY=; h=From:To:Subject:Date:From; b=pnaV7dqfj7IVefs/bkWUlGkFVn1AbSJypeH2mUC5FD/gHDgi+67vl0wFdAK0+p9Hh V//he0WH0bHl3v38FJRPfTFGVL18yWCGXSxRQOp0V57qvnDpZo+0m4TLc5n8sE1/cd c+iunz5csEXBNCGtaxV3yn84ECI32+mek4N7N+LA= From: "hristo at venev dot name" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114645] New: std::chrono::current_zone ignores $TZ on Linux Date: Mon, 08 Apr 2024 19:01:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hristo at venev dot name X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114645 Bug ID: 114645 Summary: std::chrono::current_zone ignores $TZ on Linux Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hristo at venev dot name Target Milestone: --- On all platforms, glibc first checks $TZ, and only defaults to `/etc/localt= ime` if it isn't set. Empty $TZ means UTC. One starting `:` is removed. glibc interprets $TZ as a path, which is resolved relative to ${TZDIR:-default_tzdir}. (if __libc_enable_secure is set, some checks are made to $TZ to prevent rea= ding of arbitrary files. In particular, it must not contain "../", and if absolu= te, must either be "/etc/localtime" or must start with the default $TZDIR) Some more details: https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dtime/tzset.c;hb=3Dae= 7468a7b0bcf22e9cd5fcae42bb9e4f65de83ee#l365 https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dtime/tzfile.c;hb=3Da= e7468a7b0bcf22e9cd5fcae42bb9e4f65de83ee#l105=