简体   繁体   中英

Javascript Date different result between Internet Explorer And Chrome

My problem about creating new Date object on javascript. When I create new Date object results as below:

Internet Explorer

Chrome

Yes I'm aware timezones different. Same URL path, same page, only browser different.

How can i fix it?

Those are the same dates. Explorer seems to be an hour ahead (GMT+0300), and is displaying Nov 1, 00:00:00. Chrome is an hour behind (GMT+0200), so it's displaying Oct 31, 23:00:00.

The difference is in the time zone. You are creating these dates when the time zones are different for those browsers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM