On Sat, Jan 4, 2020, at 15:11, Random832 wrote: > ... I just discovered, in the course of trying to make a more fleshed-out implementation, that the correct way to do this is datetime.now().astimezone(None) - this isn't explained very well in the documentation.
I did notice, though that a datetime created in this way does not return anything for dst(). And the part where I think naive datetimes should be able to answer utcoffset(), tzname(), and dst() using the system local time still stands. I think that calling one of these functions on a naive datetime is likely to be a mistake in any code that does so now, and that calling one of them check if it is naive seems unlikely vs just checking obj.tzinfo is None. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/G7SZNL6E5KIWUJUHHVHSUGV2SHRRDQIU/ Code of Conduct: http://python.org/psf/codeofconduct/