Set Cookies - specific expiry date and time format

I need to create a cookie with specific expiration date and time. Can you please give me advice what should be the correct expiry date and time format in this case ?
04 Jul 2019 at 06:25 PM
0pnshow more

To create a cookie in Javascript with specific expiry date, you have to set the exact expiration weekday, day, month, year and time. You have to match the following formatting:

document.cookie = "abc=12345; expires=Thu, 15 Aug 2019 12:00:00 GMT; path=/";

Both weekday and month have to be set in shorten format. To create this type of cookie, the whole date has to be correct. The weekday has to match the stated date.
21 Jul 2019 at 12:52 PM
0pnshow more
Share on FacebookShare on TwitterShare on LinkedInSend email
2021 AnswerTabsTermsContact us