Datetime fix to stop outputting warnings