--- ../../orig/gnome-calendar/src/gcal-time-selector.c	2015-10-10 22:50:49.686235347 -0700
+++ gcal-time-selector.c	2015-10-10 22:25:25.179554389 -0700
@@ -142,7 +142,7 @@
   if (format_24h)
     gtk_adjustment_set_upper (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->hour_spin)), 23.0);
   else
-    gtk_adjustment_set_upper (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->hour_spin)), 11.0);
+    gtk_adjustment_set_upper (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->hour_spin)), 12.0);
 }
 
 static void
@@ -238,6 +238,9 @@
 
       period = hours < 12? AM : PM;
       hours = hours % 12;
+      if(hours == 0){
+        hours = 12;
+      }
 
       gtk_combo_box_set_active (GTK_COMBO_BOX (priv->period_combo), period);
       gtk_adjustment_set_value (hour_adj, hours);
@@ -276,7 +279,7 @@
       gint am_pm;
 
       am_pm = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->period_combo));
-      *hours = (gint) gtk_adjustment_get_value (hour_adj) + 12 * am_pm;
+      *hours = (gint) gtk_adjustment_get_value (hour_adj) % 12 + 12 * am_pm;
     }
 
   /* minute field isn't dependant on 12h/24h format */
