python 3 fix and change time manipulation to better capture the full #