linux下对date和timestamp的互转

1. date 到 timestamp:

$ date -d '2009-12-01 23:20' +%s
1259680800
2. timestamp 到 date
$ date -d '1970-01-01 1259680800 sec utc'
Tue Dec 1 23:20:00 CST 2009

 

posted on 2016-07-25 15:16  iokde.com  阅读(467)  评论(0编辑  收藏  举报

导航