diff --git a/ChangeLog b/ChangeLog index 68e4d07b9..372dc57fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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ř * left.php, navigation.php, scripts/setup.php, js/querywindow.js, diff --git a/libraries/transformations/text_plain__dateformat.inc.php b/libraries/transformations/text_plain__dateformat.inc.php index 023b81364..781d902c5 100644 --- a/libraries/transformations/text_plain__dateformat.inc.php +++ b/libraries/transformations/text_plain__dateformat.inc.php @@ -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?