I am using Angular and primeng p-calendar to provide me with a date picker to select a date in the past. When I save a date like the 24 Nov 82 it saves it in the database as shown below. I believe I am saving the dates as UTC, but when I save a date of the 19 Nov 1943 it puts the data to the 18th because, it is taking away an hour. When I load the 19th up back in the p-calendar it puts the date as the 18th and not the 19th?
Am I saving this incorrectly? or do I need to think about handling it when I load the date back up? e.g. do I need to take the UTC and convert it to my browsers timezone?
For the 24 Nov 1982 I get this when I debug the angular side:
For the 18 Nov 1943 I get this when I debug the angular side:
I have hear mention of dayjs, would this solve my problem?
Any assistance would be greatly appreciated