From 2b725708efbbe24520cbfef8ae2729194d72632d Mon Sep 17 00:00:00 2001 From: Toutsu Date: Mon, 1 Jun 2026 20:00:59 +0300 Subject: [PATCH] test(discord): keep Moscow time parsing fixture in future --- .../Discord/DiscordNewSessionHandlerTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/GmRelay.Bot.Tests/Discord/DiscordNewSessionHandlerTests.cs b/tests/GmRelay.Bot.Tests/Discord/DiscordNewSessionHandlerTests.cs index 53c70fd..d72e9d5 100644 --- a/tests/GmRelay.Bot.Tests/Discord/DiscordNewSessionHandlerTests.cs +++ b/tests/GmRelay.Bot.Tests/Discord/DiscordNewSessionHandlerTests.cs @@ -20,7 +20,10 @@ public sealed class DiscordNewSessionHandlerTests [Fact] public void ParseTimeInput_ShouldTreatInputAsMoscowTime() { - var result = DiscordNewSessionHandler.ParseTimeInput("2026-06-01 15:00"); + var future = DateTimeOffset.UtcNow.AddDays(7); + var result = DiscordNewSessionHandler.ParseTimeInput( + future.ToString("yyyy-MM-dd '15:00'", System.Globalization.CultureInfo.InvariantCulture)); + Assert.True(result.IsSuccess); // 15:00 MSK = 12:00 UTC Assert.Equal(12, result.Value.Hour);