diff options
Diffstat (limited to 'clock.pm')
-rwxr-xr-x | clock.pm | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -116,7 +116,8 @@ $window->show_all; Gtk->main_iteration while Gtk->events_pending; $calendar->realize; -(undef,undef,undef,$old_day,$old_month,$old_year) = localtime(time); +(undef,undef,$h_old,$old_day,$old_month,$old_year) = localtime(time); +$is24 = $h_old>12; $old_year += 1900; $calendar->select_month($old_month, $old_year); $calendar->select_day($old_day); @@ -139,6 +140,7 @@ sub changed { $h_old= $adj_h->get_value; $is24 = !$is24; } + $h_old= $adj_h->get_value; } sub spinned { |