Skip to content

Commit

Permalink
Update framework.php
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 authored Jun 28, 2024
1 parent c55aadf commit c55f052
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions upload/system/framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@
$db = new DB($config->get('db_type'), $config->get('db_hostname'), $config->get('db_username'), $config->get('db_password'), $config->get('db_database'), $config->get('db_port'), $config->get('db_ssl_key'), $config->get('db_ssl_cert'), $config->get('db_ssl_ca'));
$registry->set('db', $db);

// Set time zone
$query = $db->query("SELECT * FROM " . DB_PREFIX . "setting WHERE `key` = 'config_timezone' AND store_id = '0'");

if ($query->num_rows) {
date_default_timezone_set($query->row['value']);
}

// Sync PHP and DB time zones
$db->query("SET time_zone = '" . $db->escape(date('P')) . "'");
}
Expand Down

0 comments on commit c55f052

Please sign in to comment.