The default value of time zone offset ($tzOffset
) is null
and not 0
. It may be due to a mistake in Joomla API documentation or it's for older versions of Joomla 2.5.
Open the file /libraries/joomla/factory.php
and search for getDate()
function:
public static function getDate($time = 'now', $tzOffset = null)
In Joomla 3, $date_zero_offset = JFactory::getDate('now', 0);
raises an error:
DateTime::__construct() expects parameter 2 to be DateTimeZone, integer given
So for Canary Islands, you can use this:
$date_zero_offset = JFactory::getDate('now', 'Atlantic/Canary');