EF Core gets a DateTime with a DateTime Kind of Unspecified. If you use the method ToUniversal it will also change the time according to the machines time zone. Since you make sure that the time is saved in UTC with instant.ToDateTimeUtc you only need to change the kind to UTC form Unspecified. I checked the implementation in my project and it works properly now.
EF Core gets a DateTime with a DateTime Kind of Unspecified. If you use the method
ToUniversal
it will also change the time according to the machines time zone. Since you make sure that the time is saved in UTC withinstant.ToDateTimeUtc
you only need to change the kind to UTC form Unspecified. I checked the implementation in my project and it works properly now.This fixes #1