ForecastVerification Local Date to RunDateTime Win

Run Settings
LanguageC#
Language Version
Run Command
using System; using System.Globalization; using System.Threading; class MainClass { static void Main() { CultureInfo standardizedCulture = (CultureInfo)CultureInfo.CurrentCulture.Clone(); standardizedCulture.DateTimeFormat.DateSeparator = "-"; standardizedCulture.DateTimeFormat.LongDatePattern = "yyyy-MM-dd hh:mm:ss"; standardizedCulture.DateTimeFormat.FullDateTimePattern = "yyyy-MM-dd hh:mm:ss"; standardizedCulture.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"; Thread.CurrentThread.CurrentCulture = standardizedCulture; Thread.CurrentThread.CurrentUICulture = standardizedCulture; var localDate = new DateTime(2018, 03, 18); Console.WriteLine($"Local Date = {localDate}"); var tzOffset = new TimeSpan(-5, 0, 0); Console.WriteLine($"Timezone Offset = {tzOffset}"); var dto = new DateTimeOffset(localDate, tzOffset); Console.WriteLine($"Start of Day, Local = {dto}"); Console.WriteLine($"Start of Day, UTC = {dto.ToUniversalTime()}"); var fcstTimeSpan = new TimeSpan(15, 0, 0, 0); Console.WriteLine($"Forecast Time Span = {fcstTimeSpan}"); var start = localDate.Add(-tzOffset); var end = start.AddDays(1); Console.WriteLine($"ValidDateTime Window = [{start}, {end})"); Console.WriteLine($"RunDateTime Window = [{end-fcstTimeSpan}, {start})"); start = start.AddHours(-1); end = end.AddHours(1); Console.WriteLine($"ValidDateTime Window (with buffer) = [{start}, {end})"); Console.WriteLine($"RunDateTime Window (with buffer) = [{end-fcstTimeSpan}, {start})"); } }
Editor Settings
Theme
Key bindings
Full width
Lines