diff --git a/crates/shepherd-hud/src/app.rs b/crates/shepherd-hud/src/app.rs index f36dbe5..7d93030 100644 --- a/crates/shepherd-hud/src/app.rs +++ b/crates/shepherd-hud/src/app.rs @@ -182,10 +182,6 @@ fn build_hud_content(state: SharedState) -> gtk4::Box { .spacing(4) .build(); - let clock_icon = gtk4::Image::from_icon_name("preferences-system-time-symbolic"); - clock_icon.set_pixel_size(20); - clock_box.append(&clock_icon); - let clock_label = gtk4::Label::new(Some("--:--")); clock_label.add_css_class("clock-label"); clock_box.append(&clock_label); diff --git a/crates/shepherd-util/src/time.rs b/crates/shepherd-util/src/time.rs index 7264412..ce01d89 100644 --- a/crates/shepherd-util/src/time.rs +++ b/crates/shepherd-util/src/time.rs @@ -92,8 +92,9 @@ pub fn now() -> DateTime { } /// Format a DateTime for display in the HUD clock. +/// Always uses 12-hour format with AM/PM, ignoring system locale. pub fn format_clock_time(dt: &DateTime) -> String { - dt.format("%H:%M").to_string() + dt.format("%l:%M %p").to_string() } /// Format a DateTime for display with full date and time. @@ -396,7 +397,7 @@ mod tests { #[test] fn test_format_clock_time() { let dt = Local.with_ymd_and_hms(2025, 12, 25, 14, 30, 45).unwrap(); - assert_eq!(format_clock_time(&dt), "14:30"); + assert_eq!(format_clock_time(&dt), "02:30 PM"); } #[test]