Change tournament date text box parsing to use invariant culture info

This commit is contained in:
Salman Ahmed 2023-10-28 16:52:33 +03:00
parent c5ff708c6f
commit c38c8e933a
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Globalization;
using osu.Framework.Bindables;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
@ -23,13 +24,13 @@ public DateTextBox()
base.Current = new Bindable<string>(string.Empty);
current.BindValueChanged(dto =>
base.Current.Value = dto.NewValue.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ"), true);
base.Current.Value = dto.NewValue.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ", DateTimeFormatInfo.InvariantInfo), true);
((OsuTextBox)Control).OnCommit += (sender, _) =>
{
try
{
current.Value = DateTimeOffset.Parse(sender.Text);
current.Value = DateTimeOffset.Parse(sender.Text, DateTimeFormatInfo.InvariantInfo);
}
catch
{