I have been unable to get the CiviCRM warning about timezone settings corrected after this just past daylight savings transition. Usually I would correct it by changing the timezone setting of the Drupal user ID's. In the past, the user's timezone setting would be an hour off to the real time, so adjusting the timezone setting in Drupal back to current time always corrected the issue. However this time the user timezone setting already was correct.
I have written up the following PHP tester:
<?php
$db = new mysqli('localhost', 'dbuserid', 'blablablapassword', 'db');
if($db->connect_errno > 0){
die('Unable to connect to database [' . $db->connect_error . ']');
}
$sql = <<<SQL
SELECT NOW() AS `NOW`
SQL;
if(!$result = $db->query($sql)){
die('There was an error running the query [' . $db->error . ']');
}
while($row = $result->fetch_assoc()){
echo 'MySQLi date: ' . $row['NOW'] . '<br />';
}
$result->free();
echo 'PHP date: ' . date('Y-m-d H:i:s');
?>
Which outputs:
MySQLi date: 2015-05-26 21:32:56
PHP date: 2015-05-26 21:32:56
Looks like they match to me.
I have also hard coded set the timezone into the Apache virtual site's configuration by adding to the site's .htaccess file:
#Added PHP Timezone information to match Linux configuration
php_value date.timezone "America/New_York"
Where else could be causing CiviCRM to complain thusly:
Environment Settings
Timestamps reported by MySQL (eg "2015-05-26 21:28") and PHP (eg "2015-05-26 20:28" ) are mismatched.
Read more about this warning
I am thankful, Michael