Events that overlap EDT/EST boundary render/span incorrectly

Report bugs for any Extensible Components

Events that overlap EDT/EST boundary render/span incorrectly

Postby lithe » Sun Jan 03, 2016 8:45 pm


General description of problem
If an event occurs over a period of time that encompasses a time change such as ending of daylights saving time and beginning of standard, then the event spans an additional day and creating any other event in the same row following this event behaves erratically
Timezone and locale (if applicable):
America/New_York (Eastern Standard Time) default English locale
Extensible version(s) tested:
  • Extensible 1.5.2
Ext JS version(s) tested:
  • Ext
OS + Browser name/version(s) tested:
  • OS X 10.11.2 El Capitan + Chrome Version 47.0.2526.106 (64-bit)
Detailed steps to reproduce:
  1. Browse to:
  2. Create an event starting on 10/31/2015 @ 12:00AM and ending on 11/2/2015 @ 12:00AM (basically crossing Nov 1st which is when the daylights savings ends for 2015)
  3. You will notice the event created spans and extra day.


Live URL to test case:
Suggested patch:
Code: Select all
         * Calculates the number of calendar days between two dates, ignoring time values.
         * A time span that starts at 11pm (23:00) on Monday and ends at 1am (01:00) on Wednesday is
         * only 26 total hours, but it spans 3 calendar days, so this function would return 3. For the
         * exact time difference, use {@link Extensible.Date.diff diff} instead.
         * @param {Date} start The start date
         * @param {Date} end The end date
         * @return {Number} The number of calendar days difference between the dates
        diffDays : function(start, end){
            var day = 1000*60*60*24,
                clear = Ext.Date.clearTime,
                diff = clear(end, true).getTime() - clear(start, true).getTime();
            return Math.floor(diff/day);

Screenshots or video links:
See Attached
Research or debugging notes:

This is a possible bug. I noticed that when creating an event that crosses over the boundary between EDT (Eastern Daylight Time) and EST (Eastern Standard Time), the span render incorrectly.

I noticed that in the Extensible.Date class, the method diffDays returns the Math.ceil() when changing that to return Math.floor(), the issue no longer occurs.
Screenshot showing the bug
Bug_x.jpg (31.54 KiB) Viewed 5021 times
Posts: 1
Joined: Sun Jan 03, 2016 8:18 pm

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest