Open the file /libraries/joomla/factory.php
and search for getDate()
function:
public static function getDate($time = 'now', $tzOffset = null)
The default value of time zone offset ($tzOffset
) is null
and not 0
. It may be due to a mistake in Joomla API documentationJoomla documentation or it's for versions older than 2.5.
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');