Article View: muc.lists.freebsd.bugs
Article #743[Bug 300977] TZ=UTC0UTC date prints wrong weekday
From: bugzilla-noreply
Date: Wed, 25 Nov 2026 12:17
Date: Wed, 25 Nov 2026 12:17
70 lines
4154 bytes
4154 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300977
Victor Stinner <victor.stinner@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |victor.stinner@gmail.com
--- Comment #1 from Victor Stinner <victor.stinner@gmail.com> ---
This is a bug in tzcode 2026d, see:
https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/I7KQYKHBNCIC6FW7JMP4LPBPSECDKDE2/
https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/O3RZGBKSO5GXBFDZKW2JXO3OQIIGYBF3/
Python is affected by the issue, see:
https://github.com/python/cpython/issues/162515
Perl is also affected:
https://github.com/Perl/perl5/issues/25089
I discovered the issue on the FreeBSD 16 buildbot of Python: FreeBSD 16 uses
FreeBSD-zoneinfo-16.snap20261028145349. It seems like FreeBSD 15 is not
affected yet, using FreeBSD-zoneinfo-15.1p7. But I didn't understand yet if the
issue is in the zoneinfo package or in the libc?
Example of Python script to reproduce the issue:
---
import datetime
import time
import os
os.environ['TZ'] = 'EST+05EDT,M3.2.0,M11.1.0'
time.tzset()
DT = datetime.datetime
current = DT(2012, 2, 19, 23, 59, 59)
currentTime = current.timestamp()
week = 60 * 60 * 24 * 7 # seconds
interval = week * 3
result = currentTime + interval
t = time.localtime(currentTime)
print("localtime:", t)
---
Output on Linux, FreeBSD 15 and FreeBSD 14: tm_wday=6
---
localtime: time.struct_time(tm_year=2012, tm_mon=2, tm_mday=19, tm_hour=23,
tm_min=59, tm_sec=59, tm_wday=6, tm_yday=50, tm_isdst=0)
---
Output on FreeBSD 16: tm_wday=4
---
localtime: time.struct_time(tm_year=2012, tm_mon=2, tm_mday=19, tm_hour=23,
tm_min=59, tm_sec=59, tm_wday=4, tm_yday=50, tm_isdst=0)
---
FreeBSD 16 returns the wrong tm_wday: 4 instead of 6.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-300977-227-LA6KGrDrAW@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<bug-300977-227@https.bugs.freebsd.org/bugzilla/>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 300977] TZ=UTC0UTC date prints wrong weekday Date: Wed, 25 Nov 2026 12:17:56 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-300977-227-LA6KGrDrAW@https.bugs.freebsd.org/bugzilla/> References: <bug-300977-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="73936"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795609077; 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=DdAx7itevS42s67zAEXSe4MrR6tMBeNRGm6Y9fzntwA=; b=Tc58SyvMVRmHrC8sS9kau5aM9s+5VD4zRLWtrHrYdsI0YMv8tBAO08Tau6djXcKKTU8FGd Z7/IsrZo1c6WbU+YiirRPR9Dmf/rzw88+rZvm4oHG+8HnTyUm0JQyYik0q44++C0PFSBMo FgremwfqixbS/R10CqeaiL2Bao3DHe306AARRTC6gJscrHGffLTxFIlqJbfdPCEwJsODch JfUHXzBQEtvELU0ZG95ZqCLVKhLtx+0xjR+XVW1o2fNSW5W6QZsa+iE/NVrFVgoIgwgZh4 VsMRBLq/ut0t+X67sANvGk+J9F+m2HPc0dLVoRfsYrN/a7kwOHvaPdTt1n3ymQ== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f In-Reply-To: <bug-300977-227@https.bugs.freebsd.org/bugzilla/> Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes