Reduced datetime manipulation when setting the cookie