Refactor date/time format constants

This commit is contained in:
Ske
2019-06-15 12:33:24 +02:00
parent fa5a616716
commit f4a53ce815
7 changed files with 24 additions and 21 deletions

View File

@@ -158,7 +158,7 @@ namespace PluralKit.Bot.Commands
if (sw == null) throw Errors.NoRegisteredSwitches;
var members = await Switches.GetSwitchMembers(sw);
await Context.Channel.SendMessageAsync(embed: EmbedService.CreateFronterEmbed(sw, members.ToList()));
await Context.Channel.SendMessageAsync(embed: EmbedService.CreateFronterEmbed(sw, members.ToList(), system.Zone));
}
[Command("timezone")]
@@ -179,7 +179,7 @@ namespace PluralKit.Bot.Commands
var currentTime = SystemClock.Instance.GetCurrentInstant().InZone(zone);
var msg = await Context.Channel.SendMessageAsync(
$"This will change the system time zone to {zone.Id}. The current time is {currentTime.ToString(Formats.DateTimeFormat, null)}. Is this correct?");
$"This will change the system time zone to {zone.Id}. The current time is {Formats.ZonedDateTimeFormat.Format(currentTime)}. Is this correct?");
if (!await Context.PromptYesNo(msg)) throw Errors.TimezoneChangeCancelled;
Context.SenderSystem.UiTz = zone.Id;
await Systems.Save(Context.SenderSystem);