So if i get this correct, you are getting BACK from strapi 12:00 as a string or are you sending a datestamp TO strapi and you need to convert it to HH:MM so Tue Dec 06 2022 20:32:34 GMT+0000 (Greenwich Mean Time) to 20:32
function toDateWithOutTimeZone(date: string): Date {
let tempTime = date.split(":");
let dt = new Date();
dt.setHours(tempTime[0]);
dt.setMinutes(tempTime[1]);
dt.setSeconds(tempTime[2]);
return dt;
}
I will proceed with this since it’s a side project, but I’m very disappointed by Strapi for this.
Time object is important in projects and to have this kind of format that you can’t do anything seems very odd to me.
Set it as a date time and you don’t get the issue then.
You can select in “date” you can select “Date” “datetime” “time”
Date and time singular are just extracted strings.
Datetime is a datetime object so might be easier work with that.