Skip to content
Snippets Groups Projects
Commit 5f092177 authored by Peter Rotich's avatar Peter Rotich
Browse files

Add db_timezone() - returns MySQL's timezone as set in session variable

parent 50535478
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,11 @@
return $version;
}
function db_timezone() {
return db_get_variable('time_zone');
}
function db_get_variable($variable, $type='session') {
$sql =sprintf('SELECT @@%s.%s',$type,$variable);
return db_result(db_query($sql));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment