[issue36759] astimezone() fails on Windows for pre-epoch times

2020-03-24 Thread Ard Kuijpers
Ard Kuijpers added the comment: It would be helpful to have a better error message than '[Errno 22] Invalid argument' on Windows, so a ValueError seems to be a good idea at the moment. -- ___ Python tracker <https://bugs.python.o

[issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument

2020-03-22 Thread Ard Kuijpers
Ard Kuijpers added the comment: Encountered this bug on Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)], so on Windows 10. I can reproduce the bug with the code in message https://bugs.python.org/msg341149. It does not seem to be a duplicate of #29097 since I