Merge branch '2013.10' into 2014.11
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 27 May 2015 15:52:55 +0000 (17:52 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 27 May 2015 15:52:55 +0000 (17:52 +0200)
Conflicts:
tine20/Calendar/Convert/Event/VCalendar/Abstract.php

Change-Id: I985ea58a6fd36d49ec5a7da3b14458bab4a95d50

1  2 
tests/tine20/Calendar/Controller/EventTests.php
tine20/Calendar/Controller/Event.php
tine20/Calendar/Convert/Event/VCalendar/Abstract.php

Simple merge
@@@ -1080,4 -1067,22 +1072,22 @@@ class Calendar_Convert_Event_VCalendar_
          // convert all datetime fields to UTC
          $event->setTimezone('UTC');
      }
 -            $date = date_create($dateString, new DateTimeZone ((string) Tinebase_Core::get(Tinebase_Core::USERTIMEZONE)));
+     
+     /**
+      * get utc datetime from date string and handle dates (ie 20140922) in usertime
+      * 
+      * @param string $dateString
+      * 
+      * TODO maybe this can be replaced with _convertToTinebaseDateTime
+      */
+     static public function getUTCDateFromStringInUsertime($dateString)
+     {
+         if (strlen($dateString) < 10) {
++            $date = date_create($dateString, new DateTimeZone ((string) Tinebase_Core::getUserTimezone()));
+         } else {
+             $date = date_create($dateString);
+         }
+         $date->setTimezone(new DateTimeZone('UTC'));
+         return $date;
+     }
  }