JS将指定的时间戳转为UTC时间

Js中获取时间戳可用var dayMiliseconds = parseInt(new Date().valueOf());Js的时间戳单位为毫秒(1s = 1000 ms),下面是一个将制定的格式转化成UTC时间的函数。//format the date string from webservice to UTC time;function toUTCtime(dateStr) { //Date(1381243615503+0530),1381243615503,(1381243615503+0800) dateStr += ""; var utcPrefix...
posted @ 2013-10-10 16:51  冰深  阅读(9301)  评论(0编辑  收藏  举报