[Pkg-owncloud-commits] [php-sabre-vobject] 83/128: Merge branch '2.1'

David Prévot taffit at moszumanska.debian.org
Tue May 20 23:11:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit c373973f73b4b22b06eb10b73530059257cca9f8
Merge: 1d91edd 52fc7bd
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Sun Mar 30 17:18:39 2014 -0400

    Merge branch '2.1'
    
    Conflicts:
    	.travis.yml

 .travis.yml                                    |  6 ++++++
 lib/Sabre/VObject/TimeZoneUtil.php             | 24 +++++++++++++++++++++---
 tests/Sabre/VObject/RecurrenceIteratorTest.php |  4 ++--
 tests/Sabre/VObject/TimeZoneUtilTest.php       |  7 ++++++-
 4 files changed, 35 insertions(+), 6 deletions(-)

diff --cc .travis.yml
index 29b2fa8,108a970..572052c
--- a/.travis.yml
+++ b/.travis.yml
@@@ -3,15 -3,14 +3,21 @@@ php
    - 5.3
    - 5.4
    - 5.5
+   - 5.5.9
+   - 5.5.10
    - 5.6
 +  - hhvm
  
  matrix:
+   allow_failures:
+     - php: 5.5.10
+ 
 -script: phpunit --configuration tests/phpunit.xml
++matrix:
 +    allowed_failures:
 +        - php: hhvm
 +
 +script:
 +  - phpunit --configuration tests/phpunit.xml
 +  - ./bin/vobject -h
  
  before_script: composer install
diff --cc lib/Sabre/VObject/TimeZoneUtil.php
index 920a6b8,cd94f02..32f934a
--- a/lib/Sabre/VObject/TimeZoneUtil.php
+++ b/lib/Sabre/VObject/TimeZoneUtil.php
@@@ -124,13 -408,23 +124,25 @@@ class TimeZoneUtil 
      static public function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain = false) {
  
          // First we will just see if the tzid is a support timezone identifier.
-         try {
-             return new \DateTimeZone($tzid);
-         } catch (\Exception $e) {
+         //
+         // The only exception is if the timezone starts with (. This is to
+         // handle cases where certain microsoft products generate timezone
+         // identifiers that for instance look like:
+         //
+         // (GMT+01.00) Sarajevo/Warsaw/Zagreb
+         //
+         // Since PHP 5.5.10, the first bit will be used as the timezone and
+         // this method will return just GMT+01:00. This is wrong, because it
+         // doesn't take DST into account.
+         if ($tzid[0]!=='(') {
+             try {
+                 return new \DateTimeZone($tzid);
+             } catch (\Exception $e) {
+             }
          }
  
 +        self::loadTzMaps();
 +
          // Next, we check if the tzid is somewhere in our tzid map.
          if (isset(self::$map[$tzid])) {
              return new \DateTimeZone(self::$map[$tzid]);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list