diff --git a/GUI/PlotPanel.cs b/GUI/PlotPanel.cs index a6f37c9..1ab4a49 100644 --- a/GUI/PlotPanel.cs +++ b/GUI/PlotPanel.cs @@ -155,7 +155,7 @@ namespace OpenHardwareMonitor.GUI { } protected override void OnPaint(PaintEventArgs e) { - now = DateTime.Now - new TimeSpan(0, 0, 4); + now = DateTime.UtcNow - new TimeSpan(0, 0, 4); List timeGrid = GetTimeGrid(); List tempGrid = GetTemperatureGrid(); diff --git a/Hardware/Sensor.cs b/Hardware/Sensor.cs index 9c8e175..10e52f1 100644 --- a/Hardware/Sensor.cs +++ b/Hardware/Sensor.cs @@ -134,7 +134,7 @@ namespace OpenHardwareMonitor.Hardware { } } catch { } if (values.Count > 0) - AppendValue(float.NaN, DateTime.Now); + AppendValue(float.NaN, DateTime.UtcNow); } private void AppendValue(float value, DateTime time) { @@ -193,7 +193,7 @@ namespace OpenHardwareMonitor.Hardware { return currentValue; } set { - DateTime now = DateTime.Now; + DateTime now = DateTime.UtcNow; while (values.Count > 0 && (now - values.First.Time).TotalDays > 1) values.Remove();