1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Removed useless STRPTIME_COMPAT constant

This commit is contained in:
Nick Liu
2020-01-17 20:07:43 +01:00
parent 24fe5c80ac
commit ce510159a9
2 changed files with 1 additions and 4 deletions

View File

@@ -789,7 +789,7 @@ class e_date
*/
public function strptime($str, $format)
{
if(STRPTIME_COMPAT !== TRUE && function_exists('strptime')) // Unix Only.
if(function_exists('strptime')) // Unix Only.
{
$vals = strptime($str,$format); // PHP5 is more accurate than below.
$vals['tm_amon'] = strftime('%b', mktime(0,0,0, $vals['tm_mon'] +1) );

View File

@@ -30,13 +30,10 @@ if (!defined('e107_INIT'))
if (!function_exists('strptime'))
{
define('STRPTIME_COMPAT', true);
function strptime($str, $format)
{
return e107::getDate()->strptime($str,$format);
}
}
//PHP < 5.2 compatibility