mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Timezone improvements
This commit is contained in:
parent
7063b62dc6
commit
c36f2f7b0d
4 changed files with 45 additions and 17 deletions
|
@ -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'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue