Update config.php
This commit is contained in:
parent
a73d7594cb
commit
c4ec4718f1
|
@ -50,22 +50,23 @@ if(!function_exists("get_config_value")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!function_exists("get_current_datetime")) {
|
if(!function_exists("get_current_datetime")) {
|
||||||
function get_current_datetime() {
|
function get_current_datetime() {
|
||||||
$datetime = false;
|
$datetime = false;
|
||||||
|
|
||||||
$config = get_config();
|
$config = get_config();
|
||||||
$timestamp = date();
|
$timestamp = date();
|
||||||
$timeformat = get_value_in_array("timeformat", $config, "Y-m-d H:i:s");
|
$timeformat = get_value_in_array("timeformat", $config, "Y-m-d H:i:s");
|
||||||
|
|
||||||
if(!array_key_empty("timeserver", $config)) {
|
if(!array_key_empty("timeserver", $config)) {
|
||||||
if(loadHelper("timetool")) {
|
if(loadHelper("timetool")) {
|
||||||
$timestamp = get_server_time($config['timeserver']);
|
$timestamp = get_server_time($config['timeserver']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$datetime = date($timeformat, $timestamp);
|
$datetime = date($timeformat, $timestamp);
|
||||||
return $datetime;
|
|
||||||
}
|
return $datetime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_scope("config", read_config());
|
set_scope("config", read_config());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user