1.字符串转化成时间戳
date -d "2012-02-02 00:00:00" +%s
输出:1328112000

2.时间戳转化为字符串
date -d "1970-01-01 UTC 1328247282 seconds" "+%F %T"
输出:2012-02-03 13:34:42