'revers timestamp in linux with specific format
i am in Linux system i have timestamp in this mode 1633986034 i want convert in this format 2022/04/01 22:10:05
how is possible do that. ??
I try in this mode but not work correct date -d @1633986034
thanks at all
Solution 1:[1]
Try date -d '@1633986034' +'%Y/%m/%d %T'
.
For more information about formating dates read the date man page
Solution 2:[2]
You need to add the date format you want to get, for example :
date -d "@1633986034" +'%Y/%m/%d %H:%M:%S'
--> 2021/10/11 23:00:34
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mime |
Solution 2 | gduh |