Open JackIsAKiwi opened 1 year ago
Sorted, calculated the time zone offset based on the local time zone rather than the UTC time zone in TrakHound-Dashboard/Pages/Dashboard/OeeHourTimeline/Controls /Row.xaml.cs
public void UpdateData(List
TimeZoneInfo localTimeZone = TimeZoneInfo.Local;
TimeSpan timeZoneOffset = localTimeZone.GetUtcOffset(DateTime.UtcNow);
foreach (var hour in hours)
{
int h = hour.Hour + timeZoneOffset.Hours;
if (h >= 24) h -= 24;
var match = HourDatas.Find(o => o.StartHour == h);
if (match != null)
{
match.Oee = hour.Oee;
if (hour.PlannedProductionTime > 0)
{
if (hour.Oee > 0.75) match.Status = 2;
else if (hour.Oee > 0.5) match.Status = 1;
else if (hour.Oee >= 0) match.Status = 0;
}
else match.Status = -1;
}
}
}
}
Set the time zone of the computer where TrakHound is installed to "UTC". Synchronize your computer time with your local time. Check the data.
Love the software, i'm just in the process of adding all our mills and lathes and its been fantastic to have that overview of the factory. The only issue i'm having is that the tracking only appears to start at midday for the OEE. I'm wondering if it's due to my timezone as we are based in New Zealand, do I need to adjust something before I compile?