Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 7a7be5b

Browse files
committed
Only change to Utc when JsConfig.AssumeUtc=true
1 parent 3669c31 commit 7a7be5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ServiceStack.Text/Common/DateTimeSerializer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ public static DateTime ParseShortestXsdDateTime(string dateTimeStr)
8080
|| dateTimeStr.Length == DefaultDateTimeFormatWithFraction.Length)
8181
{
8282
var unspecifiedDate = DateTime.Parse(dateTimeStr, CultureInfo.InvariantCulture);
83-
unspecifiedDate = DateTime.SpecifyKind(unspecifiedDate, DateTimeKind.Utc);
83+
if (JsConfig.AssumeUtc)
84+
unspecifiedDate = DateTime.SpecifyKind(unspecifiedDate, DateTimeKind.Utc);
8485

8586
return unspecifiedDate.Prepare();
8687
}

0 commit comments

Comments
 (0)