使用date转换UNIX时间戳

1.将time string转换成时间戳

date -d "2010-10-12 12:25:00" +%s

2.将时间戳转换成time string

date -d "@1341213505"

posted on 2015-06-11 09:55  chen8840  阅读(363)  评论(0编辑  收藏  举报