From 9b4f0a9ce22e80dab2124f346c78e4077e0b8984 Mon Sep 17 00:00:00 2001 From: wnvko Date: Thu, 30 Apr 2026 12:58:35 +0300 Subject: [PATCH] fix: format date and time labels always using invariant culture --- code-gen-library/FormatDateLabelAsDateAndTime/WPF.cs | 3 ++- code-gen-library/FormatDateLabelAsDateAndTime/WindowsForms.cs | 3 ++- code-gen-library/FormatDateLabelAsShortDate/WPF.cs | 3 ++- code-gen-library/FormatDateLabelAsShortDate/WindowsForms.cs | 3 ++- code-gen-library/FormatDateLabelAsTime/WPF.cs | 3 ++- code-gen-library/FormatDateLabelAsTime/WindowsForms.cs | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/code-gen-library/FormatDateLabelAsDateAndTime/WPF.cs b/code-gen-library/FormatDateLabelAsDateAndTime/WPF.cs index 25b076b7b..983cded57 100644 --- a/code-gen-library/FormatDateLabelAsDateAndTime/WPF.cs +++ b/code-gen-library/FormatDateLabelAsDateAndTime/WPF.cs @@ -1,6 +1,7 @@ //begin imports using System; using System.Collections; +using System.Globalization; //end imports public class FormatDateLabelAsDateAndTime @@ -36,7 +37,7 @@ public string FormatDateLabelAsDateAndTime(object sender, object item) d = (DateTime)item.GetType().GetProperty("Date").GetValue(item); } - return d.ToString("yyyy-MM-dd HH:mm:ss"); + return d.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); } //end eventHandler } \ No newline at end of file diff --git a/code-gen-library/FormatDateLabelAsDateAndTime/WindowsForms.cs b/code-gen-library/FormatDateLabelAsDateAndTime/WindowsForms.cs index 5cceb5d7f..7f4508307 100644 --- a/code-gen-library/FormatDateLabelAsDateAndTime/WindowsForms.cs +++ b/code-gen-library/FormatDateLabelAsDateAndTime/WindowsForms.cs @@ -1,6 +1,7 @@ //begin imports using System; using System.Collections; +using System.Globalization; using Infragistics.Win.DataVisualization; //end imports @@ -36,7 +37,7 @@ public string FormatDateLabelAsDateAndTime(AxisLabelInfo info) d = (DateTime)info.Item.GetType().GetProperty("Date").GetValue(info.Item); } - return d.ToString("yyyy-MM-dd HH:mm:ss"); + return d.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); } //end eventHandler } \ No newline at end of file diff --git a/code-gen-library/FormatDateLabelAsShortDate/WPF.cs b/code-gen-library/FormatDateLabelAsShortDate/WPF.cs index 1284d2342..3d8efbf16 100644 --- a/code-gen-library/FormatDateLabelAsShortDate/WPF.cs +++ b/code-gen-library/FormatDateLabelAsShortDate/WPF.cs @@ -1,6 +1,7 @@ //begin imports using System; using System.Collections; +using System.Globalization; //end imports public class FormatDateLabelAsShortDate @@ -36,7 +37,7 @@ public string FormatDateLabelAsShortDate(object sender, object item) d = (DateTime)item.GetType().GetProperty("Date").GetValue(item); } - return d.ToString("MM/dd/yy"); + return d.ToString("MM/dd/yy", CultureInfo.InvariantCulture); } //end eventHandler } \ No newline at end of file diff --git a/code-gen-library/FormatDateLabelAsShortDate/WindowsForms.cs b/code-gen-library/FormatDateLabelAsShortDate/WindowsForms.cs index df2b45078..f69d44b00 100644 --- a/code-gen-library/FormatDateLabelAsShortDate/WindowsForms.cs +++ b/code-gen-library/FormatDateLabelAsShortDate/WindowsForms.cs @@ -1,6 +1,7 @@ //begin imports using System; using System.Collections; +using System.Globalization; using Infragistics.Win.DataVisualization; //end imports @@ -36,7 +37,7 @@ public string FormatDateLabelAsShortDate(AxisLabelInfo info) d = (DateTime)info.Item.GetType().GetProperty("Date").GetValue(info.Item); } - return d.ToString("MM/dd/yy"); + return d.ToString("MM/dd/yy", CultureInfo.InvariantCulture); } //end eventHandler } \ No newline at end of file diff --git a/code-gen-library/FormatDateLabelAsTime/WPF.cs b/code-gen-library/FormatDateLabelAsTime/WPF.cs index 303e35201..b8a25ed9d 100644 --- a/code-gen-library/FormatDateLabelAsTime/WPF.cs +++ b/code-gen-library/FormatDateLabelAsTime/WPF.cs @@ -1,6 +1,7 @@ //begin imports using System; using System.Collections; +using System.Globalization; //end imports public class FormatDateLabelAsTime @@ -36,7 +37,7 @@ public string FormatDateLabelAsTime(object sender, object item) d = (DateTime)item.GetType().GetProperty("Date").GetValue(item); } - return d.ToString("HH:mm:ss"); + return d.ToString("HH:mm:ss", CultureInfo.InvariantCulture); } //end eventHandler } \ No newline at end of file diff --git a/code-gen-library/FormatDateLabelAsTime/WindowsForms.cs b/code-gen-library/FormatDateLabelAsTime/WindowsForms.cs index 8e7672feb..9cfbebc0e 100644 --- a/code-gen-library/FormatDateLabelAsTime/WindowsForms.cs +++ b/code-gen-library/FormatDateLabelAsTime/WindowsForms.cs @@ -1,6 +1,7 @@ //begin imports using System; using System.Collections; +using System.Globalization; using Infragistics.Win.DataVisualization; //end imports @@ -36,7 +37,7 @@ public string FormatDateLabelAsTime(AxisLabelInfo info) d = (DateTime)info.Item.GetType().GetProperty("Date").GetValue(info.Item); } - return d.ToString("HH:mm:ss"); + return d.ToString("HH:mm:ss", CultureInfo.InvariantCulture); } //end eventHandler } \ No newline at end of file