79307905

Date: 2024-12-25 15:54:40
Score: 0.5
Natty:
Report link

If you pass the date as a string it creates the date in UTC.

const t1 = new Date(2024,11,12) // 11 because month starts at 0
// -> '2024-12-11T23:00:00.000Z' (I am in UTC+1)

const t2 = new Date("2024-12-12")
// '2024-12-12T00:00:00.000Z'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Jingyi Wang