Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15475973
D14371.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14371.id.diff
View Options
diff --git a/src/applications/config/check/PhabricatorMySQLSetupCheck.php b/src/applications/config/check/PhabricatorMySQLSetupCheck.php
--- a/src/applications/config/check/PhabricatorMySQLSetupCheck.php
+++ b/src/applications/config/check/PhabricatorMySQLSetupCheck.php
@@ -319,9 +319,11 @@
->addMySQLConfig('innodb_buffer_pool_size');
}
+ $conn_w = id(new PhabricatorUser())->establishConnection('w');
+
$ok = PhabricatorStorageManagementAPI::isCharacterSetAvailableOnConnection(
'utf8mb4',
- id(new PhabricatorUser())->establishConnection('w'));
+ $conn_w);
if (!$ok) {
$summary = pht(
'You are using an old version of MySQL, and should upgrade.');
@@ -339,6 +341,28 @@
->setMessage($message);
}
+ $info = queryfx_one(
+ $conn_w,
+ 'SELECT UNIX_TIMESTAMP() epoch');
+
+ $epoch = (int)$info['epoch'];
+ $local = PhabricatorTime::getNow();
+ $delta = (int)abs($local - $epoch);
+ if ($delta > 60) {
+ $this->newIssue('mysql.clock')
+ ->setName(pht('Major Web/Database Clock Skew'))
+ ->setSummary(
+ pht(
+ 'This host is set to a very different time than the database.'))
+ ->setMessage(
+ pht(
+ 'The database host and this host ("%s") disagree on the current '.
+ 'time by more than 60 seconds (absolute skew is %s seconds). '.
+ 'Check that the current time is set correctly everywhere.',
+ php_uname('n'),
+ new PhutilNumber($delta)));
+ }
+
}
protected function shouldUseMySQLSearchEngine() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 8, 1:55 AM (4 h, 14 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7332168
Default Alt Text
D14371.id.diff (1 KB)
Attached To
Mode
D14371: Add a setup warning for major clock skew issues
Attached
Detach File
Event Timeline
Log In to Comment