Skip to content

Commit 39f1e1f

Browse files
committed
python-stdlib/datetime/datetime.py: Add a TODO.
There's code there that doesn't work properly with timezones. The fix is left for the future, but at least I want to mark it as dodgy to make it more likely I remember to go back and fix it.
1 parent 4ee4e22 commit 39f1e1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python-stdlib/datetime/datetime.py

+1
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ def timetuple(self):
831831
conv = _tmod.gmtime
832832
epoch = datetime.EPOCH.replace(tzinfo=None)
833833
else:
834+
# TODO this is wrong when a timezone is set
834835
conv = _tmod.localtime
835836
epoch = datetime.EPOCH
836837
return conv(round((self - epoch).total_seconds()))

0 commit comments

Comments
 (0)