diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 16ed3215bc2c1a..7cdead303f8212 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1535,7 +1535,7 @@ Instance methods: or by calculating the timestamp directly:: - timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1) + timestamp = (dt - datetime(1970, 1, 1)).total_seconds() .. method:: datetime.weekday()