1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Timezone improvements

This commit is contained in:
DanieL 2022-04-20 14:28:46 -03:00
parent 7063b62dc6
commit c36f2f7b0d
4 changed files with 45 additions and 17 deletions

View file

@ -7194,6 +7194,22 @@ function getDatabaseTime() {
return $_getDatabaseTime;
}
function getDatabaseTimezoneName() {
global $global, $_getDatabaseTime;
if (isset($_getDatabaseTime)) {
return $_getDatabaseTime;
}
$sql = "SELECT @@system_time_zone as time_zone";
$res = sqlDAL::readSql($sql);
$data = sqlDAL::fetchAssoc($res);
sqlDAL::close($res);
if ($res) {
return $row['time_zone'];
} else {
return false;
}
}
function get_js_availableLangs() {
global $global;
if (empty($global['js_availableLangs'])) {