Skip to content

Commit 16878b6

Browse files
committed
Make tryParse<DateTime> return a UTC DateTime
1 parent 020eb23 commit 16878b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FSharpPlus/Control/Converter.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type TryParse =
116116
match DateTime.TryParseExact (x, [|"yyyy-MM-ddTHH:mm:ss.fffZ"; "yyyy-MM-ddTHH:mm:ssZ"|], null, DateTimeStyles.RoundtripKind) with
117117
| true, x -> Some x
118118
| _ ->
119-
match DateTime.TryParse (x, CultureInfo.InvariantCulture, DateTimeStyles.None) with
119+
match DateTime.TryParse (x, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal) with
120120
| true, x -> Some x
121121
| _ -> None
122122

0 commit comments

Comments
 (0)