time_utils.py: cleaning and adding comments