I have the problem that when I send my json-object to my API, the DateTime is reset by one hour. I already read that I should use DateTimeOffset. I did that too, but I get the same result. An example of what my object looks like:
{
"Person": {
"Birthday": "2000-01-26T00:00:00+01:00"
}
}
So everything is correct, but as soon as the object is transferred to the API, the object looks like this:
{
"Person": {
"Birthday": "2000-01-25T23:00:00+00:00"
}
}
To get the data I saved it like this:
Person person = new Person
{
Birthday = DateTimeOffset.Parse(row["Birthday"].ToString())
}