简体   繁体   中英

Transform cookie expiry value in readable format

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

Use PHP's date() function.

Example:

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

It should return

06/23/2019

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM