From 9d78fe5825c43bbdc87daab15e97f3c53d1828da Mon Sep 17 00:00:00 2001 From: Holger Just Date: Tue, 19 Oct 2010 11:38:55 -0200 Subject: [PATCH] Use 12:00 as a reference point for simple dates instead of midnight. (#4025) In locales where DST timezone changes occur on midnight (like Brazil) the calendar becomes confused which date to show. On DST ends, the date sprung back from 2010-10-17 00:00 to 2010-10-16 23:00 in Brazil. Thus, the date 2010-10-16 was shown two times. Using 12 as the default hour for dates does circumvent this issue. If DST changes occur around noon or the time picker functionality is used, this still breaks however. --- public/javascripts/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/calendar/calendar.js b/public/javascripts/calendar/calendar.js index 43ba1c1c2..8e483ed7d 100644 --- a/public/javascripts/calendar/calendar.js +++ b/public/javascripts/calendar/calendar.js @@ -1589,7 +1589,7 @@ Date.parseDate = function(str, fmt) { var a = str.split(/\W+/); var b = fmt.match(/%./g); var i = 0, j = 0; - var hr = 0; + var hr = 12; var min = 0; for (i = 0; i < a.length; ++i) { if (!a[i])