Skip to content

Commit

Permalink
Removed useless STRPTIME_COMPAT constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Jan 18, 2020
1 parent 24fe5c8 commit ce51015
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion e107_handlers/date_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ function computeLapse($older_date, $newer_date = FALSE, $mode = FALSE, $show_sec
*/
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) );
Expand Down
3 changes: 0 additions & 3 deletions e107_handlers/php_compatibility_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@

if (!function_exists('strptime'))
{

define('STRPTIME_COMPAT', true);
function strptime($str, $format)
{
return e107::getDate()->strptime($str,$format);
}

}

//PHP < 5.2 compatibility
Expand Down

0 comments on commit ce51015

Please sign in to comment.