The problem I'm having is that I have a n object that includes a Date property. When the object is created or edited, that Date property is sent to the API using an HTTP put or post method, but the value of the date is changed when it's sent out.
What I see before it gets sent out to the API is this:
Sun Nov 03 2019 07:00:00 GMT-0700 (Pacific Standard Time)
I even put it through a conversion function to reset the time to 00:00:00, so it looks like this:
Sun Nov 03 2019 00:00:00 GMT-0700 (Pacific Daylight Time)
But when I look at the network tab in Chrome the value that is sent for that property is this:
2019-11-03T07:00:00.000Z
Every time it's edited, assuming the date isn't changed, the value of that date is incremented by whatever the offset is (7 hours in this case), so after a couple edits the date changed to the next day... I can't figure out how to keep the property a Date, but make the value sent to the API midnight on the date selected.
I'm sure this has been answered so many times, but I've spent hours trying to find the answer to this and all I can come up with is to convert my date to a string, which isn't possible because the DTO has it set as a Date.
Thanks!