Closed Franklin89 closed 4 years ago
@StevenRasmussen Will you publish a new NuGet package? :-)
@Franklin89 - Definitely! I'm trying to wrap up some unit tests around DateDiff
and DateDiffBig
functionality that I've implemented. Once that's complete I'll publish a new package.
Perfect 👍 awesome work you have done 👍
Thanks! Just published v1.3.0 which includes your fix.
I am using an
Instant
for myCreated
andModified
date and times. If I save the object to the SQL Server the UTC Time is saved as DateTime. Which is all correct. But when I load the object and check theInstant
it is at the wrong UTC Time. I suppose this is because of the following line.https://github.com/StevenRasmussen/EFCore.SqlServer.NodaTime/blob/51a68a34c9335b874804c9b910096b494d1a9695/src/SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime/Storage/InstantValueConverter.cs#L24
If EF Core Maps to a DateTime the Kind will most likely be Unspecified. Calling
ToUniversalTime
will change the offset depending on the machines timezone. So I think there is no need for theToUniversalTime
method call.