diff --git a/ChangeLog b/ChangeLog index 0a24092cd0..2763231768 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog - bug #4552 Incorrect routines display for database due to case insensitive checks - bug #4259 reCaptcha sound session expired problem - bug #4557 PHP fatal error, undefined function __() +- bug #4568 Date displayed incorrectly when charting a timeline 4.2.10.1 (2014-10-21) - bug #4562 [security] XSS in debug SQL output diff --git a/js/tbl_chart.js b/js/tbl_chart.js index d945df6f39..95bdc768a0 100644 --- a/js/tbl_chart.js +++ b/js/tbl_chart.js @@ -17,12 +17,12 @@ function extractDate(dateString) { matches = dateTimeRegExp.exec(dateString); if (matches !== null && matches.length > 0) { match = matches[0]; - return new Date(match.substr(0, 4), match.substr(5, 2), match.substr(8, 2), match.substr(11, 2), match.substr(14, 2), match.substr(17, 2)); + return new Date(match.substr(0, 4), parseInt(match.substr(5, 2), 10) - 1, match.substr(8, 2), match.substr(11, 2), match.substr(14, 2), match.substr(17, 2)); } else { matches = dateRegExp.exec(dateString); if (matches !== null && matches.length > 0) { match = matches[0]; - return new Date(match.substr(0, 4), match.substr(5, 2), match.substr(8, 2)); + return new Date(match.substr(0, 4), parseInt(match.substr(5, 2), 10) - 1, match.substr(8, 2)); } } return null;