Convert between unix epoch and date/time or vice-versa
The current unix epoch and datetime is:
new Date().valueOf() / 1000;
import time
time.time()
time()
Date.now().toISOString();
from datetime import datetime
datetime.now().isoformat()
date('Y-m-d\TH:i:s')
Date(1666013569 * 1000).toISOString();
from datetime import datetime
datetime.fromtimestamp(1666013569).isoformat()
date('Y-m-d\TH:i:s', 1666013569)
Date.parse('2022-10-17T13:53:47.293Z');
from datetime import datetime
int(datetime.fromisoformat('2022-10-17T13:52:57').timestamp())
date("U", strtotime('2022-10-17T13:52:57'))