public static function validUntil($date, $days)
{
$db = Factory::getDBO();
$nullDate = $db->getNullDate();
$now = Factory::getDate();
$config = Factory::getConfig();
$orderDate = Factory::getDate($date);
$tz = new DateTimeZone($config->get('offset'));
$orderDate->setTimezone($tz);
$daysTime = $days * 24 * 60 * 60;
$expireDate = $orderDate->toUnix() + $daysTime;
if ($days == '0') {
// NO LIMIT
return false;
} else {
return HTMLHelper::date($expireDate, Text::_('DATE_FORMAT_LC2'));
}
}