diff --git a/Dashboard/CollectorScheduleWindow.xaml b/Dashboard/CollectorScheduleWindow.xaml
index e002f72d..ee370e21 100644
--- a/Dashboard/CollectorScheduleWindow.xaml
+++ b/Dashboard/CollectorScheduleWindow.xaml
@@ -40,8 +40,8 @@
-
-
+
+
diff --git a/Dashboard/ManageServersWindow.xaml b/Dashboard/ManageServersWindow.xaml
index 8f83ad24..9c279c8c 100644
--- a/Dashboard/ManageServersWindow.xaml
+++ b/Dashboard/ManageServersWindow.xaml
@@ -50,7 +50,7 @@
-
+
diff --git a/Dashboard/Models/ServerConnectionStatus.cs b/Dashboard/Models/ServerConnectionStatus.cs
index 15f84571..5000dd14 100644
--- a/Dashboard/Models/ServerConnectionStatus.cs
+++ b/Dashboard/Models/ServerConnectionStatus.cs
@@ -7,7 +7,6 @@
*/
using System;
-using System.Globalization;
namespace PerformanceMonitorDashboard.Models
{
@@ -127,7 +126,7 @@ public string LastCheckedDisplay
if (elapsed.TotalHours < 24)
return $"Checked {(int)elapsed.TotalHours}h ago";
- return $"Checked {LastChecked.Value.ToString("MMM d, h:mm tt", CultureInfo.CurrentCulture)}";
+ return $"Checked {LastChecked.Value.ToString("g")}";
}
}
@@ -147,7 +146,7 @@ public string StatusDurationDisplay
{
if (ServerStartTime.HasValue)
{
- return $"Online since {ServerStartTime.Value.ToString("MMM d, h:mm tt", CultureInfo.CurrentCulture)}";
+ return $"Online since {ServerStartTime.Value.ToString("g")}";
}
return "Online";
}
diff --git a/Dashboard/ServerTab.xaml.cs b/Dashboard/ServerTab.xaml.cs
index 1d54bc03..3bff0a9d 100644
--- a/Dashboard/ServerTab.xaml.cs
+++ b/Dashboard/ServerTab.xaml.cs
@@ -172,7 +172,7 @@ private void InitializeTimeComboBoxes()
for (int h = 0; h < 24; h++)
{
var dt = DateTime.Today.AddHours(h);
- hours.Add(dt.ToString("h tt")); // "12 AM", "1 AM", ..., "11 PM"
+ hours.Add(dt.ToString("HH:00")); // "00:00", "01:00", ..., "23:00"
}
GlobalFromHour.ItemsSource = hours;
diff --git a/Lite/Controls/ServerTab.xaml.cs b/Lite/Controls/ServerTab.xaml.cs
index 4e30cdae..40f7877a 100644
--- a/Lite/Controls/ServerTab.xaml.cs
+++ b/Lite/Controls/ServerTab.xaml.cs
@@ -144,7 +144,7 @@ private void InitializeTimeComboBoxes()
for (int h = 0; h < 24; h++)
{
var dt = DateTime.Today.AddHours(h);
- hours.Add(dt.ToString("h tt")); // "12 AM", "1 AM", ..., "11 PM"
+ hours.Add(dt.ToString("HH:00")); // "00:00", "01:00", ..., "23:00"
}
FromHourCombo.ItemsSource = hours;
diff --git a/Lite/Models/ServerConnectionStatus.cs b/Lite/Models/ServerConnectionStatus.cs
index 16977173..3bb56012 100644
--- a/Lite/Models/ServerConnectionStatus.cs
+++ b/Lite/Models/ServerConnectionStatus.cs
@@ -7,7 +7,6 @@
*/
using System;
-using System.Globalization;
namespace PerformanceMonitorLite.Models;
@@ -146,7 +145,7 @@ public string LastCheckedDisplay
if (elapsed.TotalHours < 24)
return $"Checked {(int)elapsed.TotalHours}h ago";
- return $"Checked {LastChecked.Value.ToString("MMM d, h:mm tt", CultureInfo.CurrentCulture)}";
+ return $"Checked {LastChecked.Value.ToString("g")}";
}
}
@@ -166,7 +165,7 @@ public string StatusDurationDisplay
{
if (ServerStartTime.HasValue)
{
- return $"Online since {ServerStartTime.Value.ToString("MMM d, h:mm tt", CultureInfo.CurrentCulture)}";
+ return $"Online since {ServerStartTime.Value.ToString("g")}";
}
return "Online";
}
diff --git a/Lite/Services/LocalDataService.CollectionHealth.cs b/Lite/Services/LocalDataService.CollectionHealth.cs
index c30557cf..8a5da51a 100644
--- a/Lite/Services/LocalDataService.CollectionHealth.cs
+++ b/Lite/Services/LocalDataService.CollectionHealth.cs
@@ -122,7 +122,7 @@ public class CollectionLogRow
public string Status { get; set; } = "";
public string? ErrorMessage { get; set; }
- public string CollectionTimeFormatted => CollectionTime.ToLocalTime().ToString("MM/dd HH:mm:ss");
+ public string CollectionTimeFormatted => CollectionTime.ToLocalTime().ToString("g");
public string DurationFormatted => DurationMs.HasValue
? (DurationMs.Value < 1000 ? $"{DurationMs.Value} ms" : $"{DurationMs.Value / 1000.0:F1} s")
@@ -167,15 +167,15 @@ public string HealthStatus
: $"{AvgDurationMs / 1000:F1} s";
public string LastSuccessFormatted => LastSuccessTime.HasValue
- ? LastSuccessTime.Value.ToLocalTime().ToString("MM/dd HH:mm:ss")
+ ? LastSuccessTime.Value.ToLocalTime().ToString("g")
: "Never";
public string LastRunFormatted => LastRunTime.HasValue
- ? LastRunTime.Value.ToLocalTime().ToString("MM/dd HH:mm:ss")
+ ? LastRunTime.Value.ToLocalTime().ToString("g")
: "Never";
public string LastErrorFormatted => LastErrorTime.HasValue
- ? LastErrorTime.Value.ToLocalTime().ToString("MM/dd HH:mm:ss")
+ ? LastErrorTime.Value.ToLocalTime().ToString("g")
: "";
}