#91384 calls for the datetime docs to be updated to say that timezone-naive datetimes are implicitly localized to the system-local timezone. Such a doc change would be misleading. Parts of the API behave that way (.timestamp, .fromtimestamp), others do not (comparisons, subtraction).
A better fix would be to choose one behavior and stick with it. Because (I assume) it is much much less, .timestamp() should be deprecated on tznaive datetime objects to either a) raise or b) behave as if the object were localized to UTC.
xref #155883 a user thinking the current behavior was a bug
#91384 calls for the datetime docs to be updated to say that timezone-naive datetimes are implicitly localized to the system-local timezone. Such a doc change would be misleading. Parts of the API behave that way (
.timestamp,.fromtimestamp), others do not (comparisons, subtraction).A better fix would be to choose one behavior and stick with it. Because (I assume) it is much much less,
.timestamp()should be deprecated on tznaive datetime objects to either a) raise or b) behave as if the object were localized to UTC.xref #155883 a user thinking the current behavior was a bug