Steps to replicate the issue (include links if applicable):
ts1 = pywikibot.Timestamp(
year=2022, month=12, day=21, hour=13,
tzinfo=datetime.timezone(datetime.timedelta(hours=-5)))
t1 = pywikibot.WbTime.fromTimestamp(ts1, timezone=-300)
t1.toTimestamp() == ts1What happens?: The equality is false.
What should have happened instead?: The equality is true
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.): For backwards compatibility, I'll introduce a parameter keep_timezone that adds the timezone in.