diff --git a/src/Flurl/Util/CommonExtensions.cs b/src/Flurl/Util/CommonExtensions.cs index d9041854..052c032c 100644 --- a/src/Flurl/Util/CommonExtensions.cs +++ b/src/Flurl/Util/CommonExtensions.cs @@ -37,6 +37,10 @@ public static IEnumerable> ToKeyValuePairs(this obj /// public static string ToInvariantString(this object obj) { // inspired by: http://stackoverflow.com/a/19570016/62600 + + var d = obj as DateTime?; + if (d != null) + return d.Value.ToString("O", CultureInfo.InvariantCulture); #if !NETSTANDARD1_0 var c = obj as IConvertible; @@ -124,4 +128,4 @@ public static void Merge(this IDictionary d1, IDicti d1.Add(kv); } } -} \ No newline at end of file +}