From 60919a6dc1d30f345a7c04b09b19073bb77279ec Mon Sep 17 00:00:00 2001
From: Nathan Gray <nathangray.bsc@gmail.com>
Date: Wed, 22 Jul 2015 14:27:45 +0000
Subject: [PATCH] Fix merged dates from the event list were not timestamps, and
 could not be formatted

---
 calendar/inc/class.calendar_merge.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php
index 452f66f1fb..2f88c94215 100644
--- a/calendar/inc/class.calendar_merge.inc.php
+++ b/calendar/inc/class.calendar_merge.inc.php
@@ -220,7 +220,7 @@ class calendar_merge extends bo_merge
 				'time' => (date('Ymd',$event['start']) != date('Ymd',$event['end']) ? $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'].' ' : '') . ($GLOBALS['egw_info']['user']['preferences']['common']['timeformat'] == 12 ? 'h:i a' : 'H:i'),
 			) as $name => $format)
 			{
-				$value = date($format,$event[$what]);
+				$value = egw_time::to($event[$what],$format);
 				if ($format == 'l') $value = lang($value);
 				$replacements['$$' .($prefix ? $prefix.'/':'').'calendar_'.$what.$name.'$$'] = $value;
 			}