chocolatdemariage/www/modules/tntofficiel/libraries/TNTOfficiel_ServiceCache.php
2017-08-30 11:37:48 +02:00

31 lines
798 B
PHP

<?php
/**
* TNT OFFICIAL MODULE FOR PRESTASHOP
*
* @author GFI Informatique <www.gfi.fr>
* @copyright 2016-2017 GFI Informatique, 2016-2017 TNT
* @license https://opensource.org/licenses/MIT MIT License
*/
require_once _PS_MODULE_DIR_.'tntofficiel/libraries/TNTOfficiel_Debug.php';
class TNTOfficiel_ServiceCache
{
/**
* Gets the number of seconds between the current time and next midnight
* @return int
*/
public static function getSecondsUntilMidnight()
{
TNTOfficiel_Debug::log(array('msg' => '>>', 'file' => __FILE__, 'line' => __LINE__));
$now = time();
$midnight = strtotime('tomorrow midnight');
$secondsUntilMidnight = $midnight - $now;
return $secondsUntilMidnight;
}
}