Made it work with Python's datetime