Correctly handle unix timestamp (RFE #1440386).
This commit is contained in:
@@ -11,6 +11,8 @@ $HeadURL$
|
||||
for ON DUPLICATE KEY (bug #1576226).
|
||||
* Documentation.html, main.php, libraries/config.default.php: Add support
|
||||
for hiding server information.
|
||||
* libraries/transformations/text_plain__dateformat.inc.php: Correctly
|
||||
handle unix timestamp (RFE #1440386).
|
||||
|
||||
2006-10-16 Michal Čihař <michal@cihar.com>
|
||||
* left.php, navigation.php, scripts/setup.php, js/querywindow.js,
|
||||
|
@@ -40,7 +40,11 @@ function PMA_transformation_text_plain__dateformat($buffer, $options = array(),
|
||||
}
|
||||
// If all fails, assume one of the dozens of valid strtime() syntaxes (http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html)
|
||||
} else {
|
||||
$timestamp = strtotime($buffer);
|
||||
if (preg_match('/^[0-9]\d{1,9}$/', $buffer)) {
|
||||
$timestamp = (int)$buffer;
|
||||
} else {
|
||||
$timestamp = strtotime($buffer);
|
||||
}
|
||||
}
|
||||
|
||||
// If all above failed, maybe it's a Unix timestamp already?
|
||||
|
Reference in New Issue
Block a user