date命令进行纪元秒与时间的转换
Posted On 2011年11月18日
Use the date command in linux to transform from utc second to date.
Display the utc second since 1970-01-01 00:00:00 UTC.
To now.
#date +%s (lower case)
1253515801
To the date we specifeid.
# date -d “20091001 00:00:00” +%s
1254326400
And vice versa.
If we got a utc seconde value , and change to the date recogenized.
# date -d @1254326400
2009年 10月 01日 星期四 00:00:00 CST
此篇文章已被阅读2177 次