赞!为何你如此优秀?
【 在 oldwatch 的大作中提到: 】
: 日占期间,上海的时区被改成了+9,和东京一致
: Due to historical reasons, the timezone a region is in can be constantly changin
: g, even disregarding DST. For example, below is the output in a runtime in Shanghai, where the timezone is UTC+08:00.
: const shModernOffset = new Date("2022-01-27").getTimezoneOffset(); // -480
: const shHistoricalOffset = new Date("1943-01-27").getTimezoneOffset(); // -540
: This is because during the Sino-Japanese War when Shanghai was under Japanese control, the timezone was changed to UTC+09:00 to align with Japan's (in effect, it was a "year-round DST"), and this was recorded in the IANA database.
:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset--
FROM 114.87.241.*