Refactored the code to use the DateTimeUtility helper class