pass DateTimeFormatInfo.CurrentInfo here instead of suppressing the warning
fixes 5ae15c8
This commit is contained in:
parent
5ae15c89c3
commit
282417c9af
|
@ -9,10 +9,8 @@ namespace BizHawk.Common
|
|||
public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
|
||||
{
|
||||
if (value is not DateTime d || destinationType != typeof(string)) throw new NotSupportedException("can only do DateTime --> string");
|
||||
#pragma warning disable CA1305
|
||||
// this function is explicitly supposed to be locale dependent
|
||||
return d.ToString();
|
||||
#pragma warning restore CA1305
|
||||
return d.ToString(DateTimeFormatInfo.CurrentInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue