summaryrefslogtreecommitdiff
path: root/plugins/libcalendaring/libcalendaring.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/libcalendaring/libcalendaring.php')
-rw-r--r--plugins/libcalendaring/libcalendaring.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index 7451c8a..c7f7cff 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -104,14 +104,17 @@ class libcalendaring extends rcube_plugin
* @param mixed Any kind of a date representation (DateTime object, string or unix timestamp)
* @return object DateTime object in user's timezone
*/
- public function adjust_timezone($dt)
+ public function adjust_timezone($dt, $dateonly = false)
{
if (is_numeric($dt))
$dt = new DateTime('@'.$dt);
else if (is_string($dt))
$dt = new DateTime($dt);
- $dt->setTimezone($this->timezone);
+ if ($dt instanceof DateTime && !($dt->_dateonly || $dateonly)) {
+ $dt->setTimezone($this->timezone);
+ }
+
return $dt;
}