en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Alternative solution to getSecondsToday() task is wrong

Open jeffchase opened this issue 3 years ago • 0 comments

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.

jeffchase avatar Mar 01 '22 20:03 jeffchase