summaryrefslogtreecommitdiffstats
path: root/clock.pm
diff options
context:
space:
mode:
Diffstat (limited to 'clock.pm')
-rwxr-xr-xclock.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/clock.pm b/clock.pm
index 0eaad013..c1a98041 100755
--- a/clock.pm
+++ b/clock.pm
@@ -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 {