diff --git a/calendar/edit_entry.php b/calendar/edit_entry.php
index 22bc7ecf6d..602b4ea190 100755
--- a/calendar/edit_entry.php
+++ b/calendar/edit_entry.php
@@ -20,6 +20,12 @@
$cal_info = new calendar_item;
+ if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
+ $hourformat .= "h";
+ } else {
+ $hourformat .= "H";
+ }
+
if ($id > 0) {
$cal = $phpgw->calendar->getevent(intval($id));
$cal_info = $cal[0];
@@ -135,7 +141,7 @@
$amsel = "checked"; $pmsel = "";
}
}
- $str = "common->show_date($cal_info->datetime,"H")."\" maxlength=\"2\">:common->show_date($cal_info->datetime,"i")."\" maxlength=\"2\">";
+ $str = "common->show_date($cal_info->datetime,$hourformat)."\" maxlength=\"2\">:common->show_date($cal_info->datetime,"i")."\" maxlength=\"2\">";
if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
$str .= "am";
$str .= "pm";
@@ -179,7 +185,7 @@
$amsel = "checked"; $pmsel = "";
}
}
- $str = "common->show_date($cal_info->edatetime,"H")."\" maxlength=\"2\">:common->show_date($cal_info->edatetime,"i")."\" maxlength=\"2\">";
+ $str = "common->show_date($cal_info->edatetime,$hourformat)."\" maxlength=\"2\">:common->show_date($cal_info->edatetime,"i")."\" maxlength=\"2\">";
if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
$str .= "am";
$str .= "pm";