3

enter image description here

I'm giving the right Params but is giving me yesterday's Date, I still haven't detected the error.

1 Answers1

1

new Date("2022-6-20").toUTCString() Worked for me. I needed to use my current Time Zone

  • 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