diff --git a/crates/shepherd-hud/src/app.rs b/crates/shepherd-hud/src/app.rs index 7d93030..170f389 100644 --- a/crates/shepherd-hud/src/app.rs +++ b/crates/shepherd-hud/src/app.rs @@ -185,6 +185,7 @@ fn build_hud_content(state: SharedState) -> gtk4::Box { let clock_label = gtk4::Label::new(Some("--:--")); clock_label.add_css_class("clock-label"); clock_box.append(&clock_label); + let mut clock_format_full = false; // Add mock indicator if mock time is active (debug builds only) #[cfg(debug_assertions)] @@ -193,6 +194,7 @@ fn build_hud_content(state: SharedState) -> gtk4::Box { let mock_indicator = gtk4::Label::new(Some("(MOCK)")); mock_indicator.add_css_class("mock-time-indicator"); clock_box.append(&mock_indicator); + clock_format_full = true; } } @@ -369,7 +371,11 @@ fn build_hud_content(state: SharedState) -> gtk4::Box { glib::timeout_add_local(Duration::from_millis(500), move || { // Update wall clock display let current_time = shepherd_util::now(); - clock_label_clone.set_text(&shepherd_util::format_clock_time(¤t_time)); + if clock_format_full { + clock_label_clone.set_text(&shepherd_util::format_datetime_full(¤t_time)); + } else { + clock_label_clone.set_text(&shepherd_util::format_clock_time(¤t_time)); + } // Update session state let session_state = state.session_state(); diff --git a/crates/shepherd-util/src/time.rs b/crates/shepherd-util/src/time.rs index ce01d89..133af4f 100644 --- a/crates/shepherd-util/src/time.rs +++ b/crates/shepherd-util/src/time.rs @@ -99,7 +99,7 @@ pub fn format_clock_time(dt: &DateTime) -> String { /// Format a DateTime for display with full date and time. pub fn format_datetime_full(dt: &DateTime) -> String { - dt.format("%Y-%m-%d %H:%M:%S").to_string() + dt.format("%Y-%m-%d %l:%M:%S %p").to_string() } /// Represents a point in monotonic time for countdown enforcement.