RPI2026F1 created this task. RPI2026F1 added projects: Pywikibot-Wikidata, Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION **Steps to replicate the issue** (include links if applicable): import zoneinfo # This is the stdlib version of pytz, only available in python 3.9+ x = pywikibot.Timestamp(year=2022, month=12, day=21, hour=12, tzinfo=zoneinfo.ZoneInfo("America/New_York")) y = pywikibot.Timestamp(year=2022, month=12, day=21, hour=17, tzinfo=zoneinfo.ZoneInfo("UTC")) xt = pywikibot.WbTime.fromTimestamp(x) yt = pywikibot.WbTime.fromTimestamp(y) print(x.timestamp() == y.timestamp()) # Should be true print(xt._getSecondsAdjusted() == yt._getSecondsAdjusted()) # Should be true **What happens?**: First line is true and second line is false since all timestamps are treated like they are in the same timezone even if the timestamp has a tzinfo property. **What should have happened instead?**: Both lines should be true. **Software version** (skip for WMF-hosted wikis like Wikipedia): **Other information** (browser name/version, screenshots, etc.): TASK DETAIL https://phabricator.wikimedia.org/T325864 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: RPI2026F1 Cc: Aklapper, pywikibot-bugs-list, RPI2026F1, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, dom_walden, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Ricordisamoa, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org