console.log(new Date(2022, 4, 6));
will output
2022-05-06T05:00:00.000Z
will give me an offset 05 hours. However I live in Texas which is currently behind UTC time by 5 hours, not ahead of it.
I find this confusing.
If I do:
console.log(new Date('2022-04-06'))
There is no offset and I get:
2022-04-06T00:00:00.000Z