Browse Source

Another fix for php 5.4

Jose Lorenzo Rodriguez 12 years ago
parent
commit
5cef679386
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Utility/Time.php

+ 2 - 2
src/Utility/Time.php

@@ -552,12 +552,12 @@ class Time extends Carbon {
 			$pattern = $format;
 		}
 
-		$timezone = $date->getTimezone();
+		$timezone = $date->getTimezone()->getName();
 		$formatter = datefmt_create(
 			$locale,
 			$dateFormat,
 			$timeFormat,
-			$timezone,
+			$timezone === '+00:00' ? 'UTC' : $timezone,
 			$calendar,
 			$pattern
 		);