"我的小公主"搜索到(2)结果

shell中获取时间戳的方式为:date -d “$currentTime” +%s $ date -d @1337743485671 "+%c" Sun 28 May 44361 12:41:11 PM CST如果要将一个日期转为时间戳,方式如下: 1、得到当前时间 currentTime=`date “+%Y-%m-%d %H:%M...

 阅读 (1269)   2016-05-23   评论 (0) 
  date  shell 

JavaScript 获取当前时间戳:第一种方法:var timestamp = Date.parse(new Date());结果:1280977330000第二种方法:var timestamp = (new Date()).valueOf();结果:1280977330748第三种方法:var timestamp = new Dat...

 阅读 (1213)   2016-05-28   评论 (0) 
  date  JavaScript