Update config.php

This commit is contained in:
Namhyeon Go 2019-10-10 16:10:32 +09:00 committed by GitHub
parent 6a6388fbd9
commit f36b518758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,15 @@ if(!check_function_exists("get_current_datetime")) {
}
}
if(!array_key_empty("now", $options)) {
try {
$dateTimeObject = \DateTime::createFromFormat($timeformat, $options['now']);
$timestamp = $dateTimeObject->getTimestamp();
} catch(Exception $e) {
$timestamp = strtotime($options['now']);
}
}
if(!array_key_empty("adjust", $options)) {
$timestamp = strtotime($options['adjust'], $timestamp);
}