From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CCB603858D20; Tue, 9 Apr 2024 17:19:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCB603858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712683194; bh=dWywa5Yl8gwd8ZODaeJrcn/m4RJ3jP2lPOrpd72zBpU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PASFOAvSNvAwqOq0DsJGa/bi94uPjWp2ZrZmmhLtCVXyoZPp1bmcB8fU1+v3E9Mdb /v3sTtnNjgHdHV6hC/7WaoosXo6LDbV2Gl2iLlbozmWhq7cRvEJhDyRQ8ufIQA21Mw YNHKtRbKhcBQQPDQyPDJl8R8bvgmNxp/kKQn1Qsw= From: "hristo at venev dot name" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114645] std::chrono::current_zone ignores $TZ on Linux Date: Tue, 09 Apr 2024 17:19:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: Message-ID: In-Reply-To: References: 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 --- Comment #13 from Hristo Venev --- > $TZ allows you to override it per-process (and even change it during the = lifetime of a process by using setenv and tzset). We don't support that for= current_zone(). /etc/localtime can also change. > The intent is to infer an IANA time zone from the /etc/localtime symlink,= if possible. If the intent was to match libc, it would look at $TZ. I've d= iscussed this exact question with the author of that library (which is the = origin of the std::chrono components too). What I said in comment 8 above i= s paraphrasing what he said. Point taken. Still, do you have any explanation for why this behavior was chosen? > Just do the easy thing yourself. The easy thing being to fix all applications that currently use or will ever use current_zone(). Fun times ahead...=