From f328b82972104386d4a4406e42bb6d7d2523e221 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 14 Jan 2019 11:07:34 -0700 Subject: [PATCH] Calendar - New event in top bar now sets time to start of next hour --- calendar/inc/class.calendar_uiforms.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index fdd8bc16ee..6d27bd265a 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -150,9 +150,11 @@ class calendar_uiforms extends calendar_ui } else { + $ts = new Api\DateTime(); + $ts->setUser(); $start = $this->bo->date2ts(array( 'full' => isset($_GET['date']) && (int) $_GET['date'] ? (int) $_GET['date'] : $this->date, - 'hour' => (int) (isset($_GET['hour']) ? $_GET['hour'] : $this->bo->cal_prefs['workdaystarts']), + 'hour' => (int) (isset($_GET['hour']) ? $_GET['hour'] : ($ts->format('H')+1)), 'minute' => (int) $_GET['minute'], )); }