mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-12 14:17:02 +00:00
Replace the date format option with a locale option (#1130)
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using ReflectionMagic;
|
||||
|
||||
namespace DiscordChatExporter.Cli.Tests.Utils;
|
||||
|
||||
internal static class TimeZoneInfoEx
|
||||
{
|
||||
// https://stackoverflow.com/a/63700512/2205454
|
||||
public static void SetLocal(TimeZoneInfo timeZone) =>
|
||||
typeof(TimeZoneInfo).AsDynamicType().s_cachedData._localTimeZone = timeZone;
|
||||
|
||||
public static void SetLocal(TimeSpan offset) =>
|
||||
SetLocal(TimeZoneInfo.CreateCustomTimeZone("test-tz", offset, "test-tz", "test-tz"));
|
||||
}
|
||||
Reference in New Issue
Block a user