Reduced datetime manipulation when getting the cookie