Replaced to single datetime.now() use, and formatting