receiving, saving and returning UTC DateTime
Hi. In Api I get a DateTime from the client in UTC format - with "Z" at the end of the string. I want to save this date in UTC format in the database and then also return it in response in UTC format.
I used such a converter on input and output:
I use it in program.cs:
Is this action sufficient to save the incoming date in UTC format to the database? Incoming DateTime have Kind = UTC, as do outgoing ones with 'Z' at the end.
0 Replies