From nobody Wed Mar 5 21:15:14 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z7QLW1PTZz5qmGM for ; Wed, 05 Mar 2025 21:15:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z7QLV56tqz3t7j for ; Wed, 05 Mar 2025 21:15:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741209314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SXCjTL9DbsDTJWXBzIRgwFvTGAK7R5BAD9XPN0ectOM=; b=iAtGz+s23Rfnmt5XIprwVobZCCJbhVieMj+eB+d4bcZa2koT1+oOc3QPqInrMMjaJDXPMf TKu32DGaycrH4w2F2FCKVAFrRaESC5i+Bye1P6jogZKu019ZM5ZCxRjOdh9/gOxua5cu5F pbYgB386SSsNJC8fw3AZ3GCjBzTky2sHxlqa1gNNe7h2dI9iewQyQUsAZA5NR/KQ2NmN3I UpR7yhHTPCswDnh/0F6bILVj7U0HFK3LFY7XcVTuIyZiP7L6AWU4yAKhRV9J9Mlij70vU5 +RTt/HYe0RLyJTh1NwhSLp4YY10iSBXv688nu1O3ua73pNtf1Bbopp4tWx8KXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741209314; a=rsa-sha256; cv=none; b=dYvyPWX8WXfbCNFPWuRW10ZW1AaU8YvO5yPGE70eI+XRvF0TvtZV8MQ1gYmdQ82lptstr3 I8fcFj6TYxIiQaki4tBRTxmcvHF4NIfspid+mvUbDd377hoYjqfJQuq4iGIO4f3V5WkkHi cActhta5Q+smuP3TJs/dvM/LsUZrNdFq/fV7phIB+3diDnudlF1nBBId1qPmsXMrwA4yry Mrk+c2uEmWNC/+3Ux75iyiEjUAfhPAV0TMBmXesqPd9bmIHVT4TUd0oKVsA2N0Ii4UfZcu VMRlhTa3rOnwerA57Jyf9LTFs8CCLoYD2d5Q77rKOBcsg8ioseRbLdFj+4fyfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741209314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SXCjTL9DbsDTJWXBzIRgwFvTGAK7R5BAD9XPN0ectOM=; b=O2vzqlBZcLhRTHT8/JC0qXIQ4F7FsgnyX6H+BJG01Zl5bi1+kWZOirnK8lKuf4bfTeiabS ymQyBloLLA409dI9q7TAqmBl+MaeTBuusIDT8+Sk8u9AJnnqpywm9rYCnBesXIu0DPa6kI O26rMCPE/xOWZKT8dte+C0sZGkahnmrDVbnXfssToDRQc9R2sg5bUh2tOeuelJvAjkx2ns khw3LdEvz4QoglxVuLjncLWhmMSduyncPm+qo5KxLEnMWpMM0YgmsFp7SQCBZik8NZUrXI h29O9FOXsPNz82CMq3YCljUItidtTbN831gj8oPa7NRovrb/qS+Eb/yRdq9OAw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Z7QLV4NhZz5xG for ; Wed, 05 Mar 2025 21:15:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 525LFEV3083992 for ; Wed, 5 Mar 2025 21:15:14 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 525LFEJF083991 for bugs@FreeBSD.org; Wed, 5 Mar 2025 21:15:14 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269207] localtime.c fails to detect mobile device timezone change Date: Wed, 05 Mar 2025 21:15:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fbsd@opal.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269207 --- Comment #6 from J.R. Oldroyd --- The existing code added when DETECT_TZ_CHANGES is defined does not work completely as expected. It does detect changes to /etc/localtime. However, on occasion, it does not return the correct timezone, defaulting to "UTC" or timezone " " (which comes from the WILDABBR code) and causing programs to receive a UTC result instead of a localtime result. It seems to fail if called less than 61 seconds after system boot (this is because the change detection code uses CLOCK_MONOTONIC so it will not trigg= er until at least DETECT_TZ_CHANGES_INTERVAL=3D61 seconds after boot). This c= auses programs started at boot to start in UTC timezone even though /etc/localtim= e is present and set to another timezone. An easy fix for this is to return 1 w= hen last_checked =3D=3D 0. It seems to also fail at other times too with an app switching back to UTC after already having learned the correct timezone. I've not had time to de= bug this yet, but suspect it could have to do with calling tzsetwall() or other function that causes the timezone name to be reset. --=20 You are receiving this mail because: You are the assignee for the bug.=