Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You might not, but the standard library sure does. And that's the exactly the problem! How can functions in the standard library know if the time is local or UTC without any indication on the value itself? (spoiler: they can't!)


As the article author correctly points out, Python should have just thrown when a method is called that requires a TZ with a datetime that doesn’t include one.

Between this, the Unicode circus, and the rejection of PEP582, Python seems more and more like the HOA that isn’t earning their monthly fees IMO.


The less stupid solution is to just make those functions produce zone aware datetimes because you have literally asked for a specific time zone.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: