Open
Description
Describe the bug 🐞
When reading back a DateTime
with kind Unspecified
and ForcedDateTimeKind = DateTimeKind.Unspecified
, the resulting date has kind Utc
and has has been converted to UTC which is unexpected.
Step to reproduce
Run this code:
using Akavache;
using System.Reactive.Linq;
BlobCache.ForcedDateTimeKind = DateTimeKind.Unspecified;
BlobCache.ApplicationName = "myapp";
BlobCache.EnsureInitialized();
var testDate = new DateTime(2024, 10, 10, 10, 10, 0, 0, DateTimeKind.Unspecified);
await BlobCache.LocalMachine.InsertObject("test", testDate);
var readBack = await BlobCache.LocalMachine.GetObject<DateTime>("test");
Console.WriteLine(testDate.ToLongTimeString() + ", " + testDate.Kind);
Console.WriteLine(readBack.ToLongTimeString() + ", " + readBack.Kind);
Reproduction repository
https://github.com/reactiveui/ReactiveUI
Expected behavior
The date that is read from the cache should be the same (same value and kind) as the one that is inserted.
Screenshots 🖼️

IDE
No response
Operating system
MacOS, iOS
Version
10.0.1
Device
No response
ReactiveUI Version
No response
Additional information ℹ️
No response