Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveCsv method ignoring supplied CultureInfo #7333

Open
totalgit74 opened this issue Dec 10, 2024 · 0 comments
Open

SaveCsv method ignoring supplied CultureInfo #7333

totalgit74 opened this issue Dec 10, 2024 · 0 comments
Labels
untriaged New issue has not been triaged

Comments

@totalgit74
Copy link

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.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

1 participant