Grimoire-
Command
.es

GNU+Linux command memo

Convert timestamp to human readable date

Table des matières

Convertir un horodatage unix / epoch en date lisible

1. date

$ date -d "@1516817552"

Can produce:

mercredi 24 janvier 2018, 19:12:32 (UTC+0100)

2. Using Python

$ python -c 'import time; time.strftime(\"%Y-%m-%d %H:%M:%S\",time.localtime(int(1516817552)))'

Can produce:

2018-01-24 19:12:32