I am trying to get currentTimeOfDay in EST. My ninjatrader platform is set to EST, my system clock is UTC +8 which is 12 hours from EST.
TimeZoneInfo estTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
DateTime estCurrentTime = TimeZoneInfo.ConvertTime(Time[0], estTimeZone);
TimeSpan currentTimeOfDay = estCurrentTime.TimeOfDay;
Print($"Current Time (EST): {estCurrentTime}, Current Time of Day: {currentTimeOfDay}");
The print is giving me the same time for both, this is the result of the print

Comment