i have a job for converting a string into date in TypeScript
When i tried to convert "2022-07-01" like "yyyy-MM-dd" by this code
let temp = '2022-07-01';
let date = new Date(temp);
It returned this value "Fri Jul 01 2022 07:00:00 GMT+0700"
But When my string is "2022-07-01 01" like "yyyy-MM-dd hh" . It turned "Invalid Value"
So my question is how can i convert ''yyyy-MM-dd hh" to Date in typeScript and can i change gmt when i convert Date? Thanks