1.查看指定时间的时间戳
 
 查看当前时间
 #date +%s
 
 查看指定时间
 #date -d 2008-01-01 +%s  
 1199116800
 #date -d 20080101 +%s
 1199116800
 
2.将时间戳转换成date
 #date -d '1970-01-01 UTC 1199116800 seconds'
 2008年 01月 01日 星期二 00:00:00 CST
 
 #export LANG=en
 #date -d '19700101 UTC 1199116800 seconds'  
 Tue Jan  1 00:00:00 CST 2008

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-10-28
猜你喜欢
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2021-06-30
  • 2021-11-13
相关资源
相似解决方案