From f7bc5b50260e05678eef086ae1f80424675b39e7 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Thu, 6 Feb 2025 00:02:25 +0800 Subject: [PATCH] Updated TZ output to AGT --- KfChatDotNetBot/Commands/TimeCommand.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/KfChatDotNetBot/Commands/TimeCommand.cs b/KfChatDotNetBot/Commands/TimeCommand.cs index 62ce31e..8aefdc7 100644 --- a/KfChatDotNetBot/Commands/TimeCommand.cs +++ b/KfChatDotNetBot/Commands/TimeCommand.cs @@ -7,13 +7,13 @@ namespace KfChatDotNetBot.Commands; public class TimeCommand : ICommand { public List Patterns => [new Regex("^time")]; - public string? HelpText => "Get current time in BMT"; + public string? HelpText => "Get current time in AGT"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { - var bmt = new DateTimeOffset(TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, + var agt = new DateTimeOffset(TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")), TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time").BaseUtcOffset); - await botInstance.SendChatMessageAsync($"It's currently {bmt:h:mm:ss tt} BMT"); + await botInstance.SendChatMessageAsync($"It's currently {agt:dddd h:mm:ss tt} AGT", true); } } \ No newline at end of file