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.):