Refactored date conversion code, added timestamps to comments