Are there any best practices for setting cookie expiration dates in PHP to ensure they are retained correctly?

When setting cookie expiration dates in PHP, it is important to ensure that the date is correctly formatted and in the future to ensure the cookie is retained by the browser. One common best practice is to set the expiration date to a timestamp in the future by adding the desired number of seconds to the current time using the `time()` function.

// Set cookie with expiration date 1 hour from now
setcookie("cookie_name", "cookie_value", time() + 3600);