-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
System Information (please complete the following information):
- OS & Version: Windows 10
- Microsoft.Data.Analysis: 0.22.0
- .NET Version: Net 6
Describe the bug
When using the SaveCsv method and passing in a CultureInfo object with the date format set (e.g. yyyy-MM-dd HH:mm:ss) the CSV file is saved with what looks to be the system settings, rendering the CultureInfo parameter useless.
To Reproduce
var ci = (CultureInfo) cultureInfo.Clone();
ci.DateTimeFormat.LongDatePattern = "yyyy-MM-dd";
ci.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd";
ci.DateTimeFormat.LongTimePattern = "HH:mm:ss";
ci.DateTimeFormat.ShortTimePattern = "HH:mm:ss";
frame.SaveCsv(<path>, cultureInfo: ci);Expected behavior
DateTime values saved in the yyyy-MM-dd HH:mm:ss format.
Observed behavior*
DateTime values saved as d/MM/yyyy h:mm tt which is the ShortDatePattern and ShortTimePattern for the CultureInfo.CurrentCulture, thereby ignoring the passed in values.