Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
なぜこれが起こるのですか?
new Date(2013, 5, 30).toJSON() "2013-06-29T23:00:00.000Z"
1時間ずらすようです。
ありがとう。
調査を行った後、この回答を復活させました。
表示されるtoJSON()日付は Z(ULU) タイムゾーン、別名 UTC ですがDate、ローカル タイム ゾーンが使用されます。
toJSON()
Date
これを行うと、違いが簡単にわかります。
new Date().getTimezoneOffset(); // should return -60 (minutes) in your case
ところで、夏時間は表示内容に影響を与える可能性がありますが、それが理由ではありません。