Skip to content

SqliteBlobCache.ForcedDateTimeKind property

Defined in

Type: SqliteBlobCache Namespace: Akavache.Sqlite3 Assembly: Akavache.Sqlite3.dll

Applies to

net11.0, net11.0-maccatalyst27.2, net11.0-android37.0, net11.0-windows10.0.19041, net11.0-macos27.2, net11.0-ios27.2, net10.0, net10.0-android36.0, net10.0-macos26.0, net10.0-maccatalyst26.0, net10.0-ios26.0, net10.0-windows10.0.19041, net472, net47, net471, net48, net481

public DateTimeKind? ForcedDateTimeKind { get; set; }

View source (opens in a new tab)

Inherited documentation

These docs were inherited from IBlobCache. The member doesn't override them on this type.

Summary: Gets or sets the DateTimeKind handling for BSON readers to be forced.

Returns: DateTimeKind? (opens in a new tab)

Remarks

By default, BsonReader uses a DateTimeKind (opens in a new tab) of Local (opens in a new tab) and see BsonWriter uses Utc (opens in a new tab). Thus, DateTimes are serialized as UTC but deserialized as local time. To force BSON readers to use some other DateTimeKind, you can set this value.