[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

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

2020-03-23 Thread Jonathan Hsu
Jonathan Hsu added the comment: This exception is raised because astimezone() ends up calling time.localtime() to determine the appropriate time zone. If the datetime object has a pre-epoch value, it passes a negative timestamp to time.localtime(). On Windows, time.localtime() does not

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

2020-03-23 Thread Jonathan Hsu
Jonathan Hsu added the comment: I'd like to take on this issue if no one else is working on it. -- ___ Python tracker ___ ___

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

2020-03-23 Thread Jonathan Hsu
Change by Jonathan Hsu : -- nosy: +Jonathan Hsu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-03-23 Thread SilentGhost
SilentGhost added the comment: Yes, I was also able to verify this issue on 3.8.2 on win10. Argument to astimezone is not required, and this happens for both naïve and aware objects. -- nosy: +belopolsky, p-ganssle resolution: duplicate -> stage: resolved -> test needed status: