Transform cookie expiry value in readable format

Viewed 277

I would ask you guys, I am writing test for checking expiry date for a chosen site. If is possible that someone help me in solving following: Have value

expiry

from cookie and is:

1561291056

Can someone help me - if there is any way to convert it to some more human readable value. Or viceversa option, I can see expiry date from

DevTools->Application->Cookies

how can convert it to above presented value (1561291056). I know I can not pickup simply from

Cookies->tab Expiry

Searched but without any success. Thanks in advance

1 Answers

Use PHP's date() function.

Example:

echo date('m/d/Y', 1561291056);

It should return

06/23/2019

Related