From b899f66747ed9f8fcd2f8372bdfbc9ff40e12beb Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 3 May 2021 17:19:45 +0100 Subject: [PATCH] fix (#1): time not adjusting time zone. The time (top-right) of dashboard was not updating to British Summer Time (BST). The change here adds a converision of the system's current/local time to match that of it current time zone. I should've done this at the beginning but here it's done now. And, most importantly, it's before the exhibition has started. --- .../EyesAndEars.UWP/Services/DataServices.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs b/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs index dc17834..e3bd735 100644 --- a/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs +++ b/src/EyesAndEars.UWP/EyesAndEars.UWP/Services/DataServices.cs @@ -15,6 +15,14 @@ namespace EyesAndEars.UWP.Services { public static class DataServices { static SpeechSynthesizer _synth = new SpeechSynthesizer(); + + public static string SetCurrentTime() { + var zone = TimeZoneInfo.Local; + var britishZone = TimeZoneInfo.FindSystemTimeZoneById(zone.Id); + var newDate = TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.Local, britishZone); + return newDate.ToShortTimeString(); + } + public static async Task UpdateDevice(string url, int deviceId, RichTextBlock logs, string currentStatus, MediaElement audioUpdater, bool _logData) { try {