Closed kostrse closed 4 years ago
SaveCsv/WriteCsv uses a default G DateTime formatter which loses information about time zone and milliseconds.
G
The more widespread nowadays, and precise, is ISO 8601 format:
2009-06-15T13:45:30.0000000-07:00
instead of a format used by WriteCsv:
04/10/2008 06:30:00
The code for reference is here:
let formatters = [ formatter (fun (dt:System.DateTime) -> if dt.TimeOfDay = TimeSpan.Zero then dt.ToString("d", ci) else dt.ToString(ci)) formatter (fun (dt:System.DateTimeOffset) -> if dt.TimeOfDay = TimeSpan.Zero then dt.Date.ToString("d", ci) else dt.DateTime.ToString(ci)) ] |> dict
Related: #355
This sounds like a reasonable change to the default behaviour to me - could you send a PR changing the default?
SaveCsv/WriteCsv uses a default
G
DateTime formatter which loses information about time zone and milliseconds.The more widespread nowadays, and precise, is ISO 8601 format:
instead of a format used by WriteCsv:
The code for reference is here:
Related: #355