[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Thank you for thoughtful and detailed answer, Paul. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread mike bayer
mike bayer added the comment: > I don't really know why it would be a "security vulnerability", but presumably a library could either convert their datetimes to UTC as soon as they get them from the user if they want to use them as UTC in the future, or they could simply refuse to accept an

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Paul Ganssle
Paul Ganssle added the comment: > That it allows creating the datetime instance looks like a bug to me, i.e. a > time before 0001-01-01 00:00 UTC is invalid. What am I misunderstanding? `datetime.datetime(1, 1, 1, tzinfo=timezone(timedelta(hours=1)))` is a valid datetime, it's just that it ca

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: That it allows creating the datetime instance looks like a bug to me, i.e. a time before 0001-01-01 00:00 UTC is invalid. What am I misunderstanding? -- nosy: +eryksun ___ Python tracker

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This tracker is for patching CPython, including the docs. Questions for discussion should be posted to python-list. Perhaps such a discussion would lead to a concrete change proposal. In the meanwhile, I think that this should be closed as 'not a bug' (as