如何转换epoch时间

2660阅读 0评论2016-10-28 centrify
分类:LINUX

How to get the current epoch time in ...

Unix/Linux

date +%s

Convert from human readable date to epoch

Unix/Linux

date +%s -d"Jan 1, 1980 00:00:01"   Replace '-d' with '-ud' to input in GMT/UTC time.

Convert from epoch to human readable date

Unix/Linux

date -d @1190000000   Replace 1190000000 with your epoch, needs recent version of 'date'. Replace '-d' with '-ud' for GMT/UTC time

上一篇:AutoHotKey 常用命令及示例
下一篇:shell对比浮点数举例