-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
The JsConfig object contains a flag called AssumeUtc. This flag causes the DateTimeSerializer to convert dates that are DateTimeKind.Unspecified on serialization to DateTimeKind.Utc using:
if (JsConfig.AssumeUtc && dateTime.Kind == DateTimeKind.Unspecified)
{
dateTime = DateTime.SpecifyKind(dateTime, DateTimeKind.Utc);
}
(lines 544-547 of NServiceKit.Text.Common.DateTimeSerializer)
However, deserialization ignores this flag and assumes that DateTimeKind.Unspecified should actually be DateTimeKind.Local.
Wouldn't it be preferable to have both serialization and deserialization honor this flag?
Metadata
Metadata
Assignees
Labels
No labels