en.javascript.info
en.javascript.info copied to clipboard
Alternative solution to getSecondsToday() task is wrong
The two solutions to getSecondsToday() return different results on a day where the time changes due to daylight savings time, such as d = new Date(2022, 2, 13, 4). The first solution correctly takes into account the time adjustment while the second does not.