Questions tagged «timestamp-with-timezone»

12
解析日期而不带时区javascript
我想在JavaScript中解析没有时区的日期。我努力了: new Date(Date.parse("2005-07-08T00:00:00+0000")); 返回时间:2005年7月8日星期五,格林尼治标准时间 +0200 (欧洲中部夏令时) new Date(Date.parse("2005-07-08 00:00:00 GMT+0000")); 返回相同的结果 new Date(Date.parse("2005-07-08 00:00:00 GMT-0000")); 返回相同的结果 我想解析时间: 没有时区。 无需调用构造函数Date.UTC或新的Date(年,月,日)。 只需将字符串简单地传递到Date构造函数即可(无需原型方法)。 我必须提供Date对象,而不是String。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.