* @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; } }