Created
May 22, 2023 09:36
-
-
Save njlr/a4de03b254793be31d04d5dbc26494e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Globalization | |
let parseIsoDateTime (s : string) = | |
let dt = DateTime.Parse(s, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind) | |
assert (dt.Kind = DateTimeKind.Utc) | |
dt | |
let dt = parseIsoDateTime "2023-05-18T15:43:14.673Z" | |
printfn "%A" dt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment