PHP cookie not set within AJAX call

Apparently I was missing the time() attribute.
So when adding this to the expire option in the setCookie function, the cookie is being set.

Code:

setcookie('user-zipcode', $zipcode, time() + MONTH_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);
setcookie('delivery-today', $cookieVal, time() + DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN);

tech