[英]Unexpected behaviour of javascript timestamp
I use phoneGap Geo-location API to get current position in which i got time-stamp also. 我使用phoneGap地理位置API来获取当前位置,在该位置我也获得了时间戳记。
alert(data[0].timestamp);
alert(new Date(data[0].timestamp).getTime());
where data[0].timestamp = "2013-12-03T19:09:58.859Z"
其中data[0].timestamp = "2013-12-03T19:09:58.859Z"
in web browser the second alert shows 1386097798859
whereas when i built and test app in mobile then it alert as NaN
I don't understand why it happens? 在Web浏览器中,第二个警报显示1386097798859
而当我在移动设备中构建和测试应用程序时,它以NaN
警报,我不明白为什么会发生?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.