adjust demos to work with PHP 5.2 or higher

This commit is contained in:
Adam Shaw
2014-01-25 00:59:37 -08:00
parent 18f41c3550
commit 0c6f0ff13c
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
//--------------------------------------------------------------------------------------------------
// Utilities for our event-fetching scripts.
//
// Requires PHP 5.3.0 or higher.
// Requires PHP 5.2.0 or higher.
//--------------------------------------------------------------------------------------------------
// PHP will fatal error if we attempt to use the DateTime class without this being set.
@@ -111,7 +111,7 @@ class Event {
function parseDateTime($string, $timezone=null) {
$date = new DateTime(
$string,
$timezone ?: new DateTimeZone('UTC')
$timezone ? $timezone : new DateTimeZone('UTC')
// Used only when the string is ambiguous.
// Ignored if string has a timezone offset in it.
);