I'm giving the right Params but is giving me yesterday's Date, I still haven't detected the error.
Asked
Active
Viewed 151 times
1 Answers
1
new Date("2022-6-20").toUTCString()
Worked for me. I needed to use my current Time Zone

Daniel_Enqz
- 71
- 7
-
1`new Date("2022-6-20").toUTCString()` produces an invalid Date in Safari at least. See [*Why does Date.parse give incorrect results?*](https://stackoverflow.com/questions/2587345/why-does-date-parse-give-incorrect-results) The timestamp is not a supported format so might be parsed as local, UTC or junk. – RobG Jun 21 '22 at 11:46