Skip to content

Commit

Permalink
Fix for cron 'lastrun' getting TZ applied. Fixes #1590
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Dec 22, 2016
1 parent 7a80eb7 commit 5b2c9a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions administrator/components/com_fabrik/models/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ public function save($data)
$date = JFactory::getDate();
$data['lastrun'] = $date->toSql();
}
else
{
$timeZone = new DateTimeZone($this->config->get('offset'));
$data['lastrun'] = JFactory::getDate($data['lastrun'], $timeZone)->toSql(false);
}

$data['params'] = json_encode($data['params']);

Expand Down

0 comments on commit 5b2c9a4

Please sign in to comment.