Create a local timezone date string. This is mainly here to normalize
browser differences. Safari creates a new date in utc whereas
other browsers create the date based on the users timezone.
By using this method, you are guaranteed that the created date is adjusted
to the current users computer time.
Create a local timezone date string. This is mainly here to normalize browser differences. Safari creates a new date in utc whereas other browsers create the date based on the users timezone.
By using this method, you are guaranteed that the created date is adjusted to the current users computer time.
const myDate = time.createLocalTimeZoneDate('2021-06-20T03:45:00'); const myDate2 = time.createLocalTimeZoneDate('2021-06-20 03:45:00');
The localTimeDate would be the localtime on the users computer.
const myDate = time.createLocalTimeZoneDate('2021-06-20T03:45:00');