简体   繁体   中英

Javascript gives different timezone on the same machine

The google chrome console is returning different timezones if I initialize the Date with a parameter or not.

JavaScript日期 In another machine the same code give me the right result:

JavaScript日期 It's weird but it's happening

I assume is Daylight Savings Time (DTS).

As it seems from the logs, the computers are not in the same location, and it seems that in Brazil, DTS is adopted regionally , applicable at the beginning of November.

A quick way to test if this is true, try creating an October date instead of November.

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