Event changes size when crossing over Daylight Saving Time


#1

Moving events across a DST barrier changes the size of an event from 1 day to 2.

DHTMLX Snippets isn’t saving, so heres my sample code (from 2020, when DST occurs on 3/8):

JS:

        scheduler.locale.labels.timeline_tab = "Timeline";
		scheduler.locale.labels.section_custom="Section";
		scheduler.locale.labels.timeline_scale_header = "Sections";
		scheduler.config.details_on_create=true;
		scheduler.config.details_on_dblclick=true;

		//===============
		//Configuration
		//===============
		var sections=[];

		for(var i = 1; i < 200; i++){
			sections.push({key:i, label:"section " + i})
		}
		var days = 7;
		scheduler.createTimelineView({
    name: "timeline",
    x_unit: "day",
    x_date: "%D %n/%j",
    section_autoheight: false, // allows more than one line in the "record" cells
    render: "tree",
    column_width: 180,
    dy: 160, // min. record column height
    dx: 300, // record column width
    x_step: 1,
          x_size: 5,
    round_position: true,
    y_unit: sections,
          y_property:	"section_id",
    scrollable: true,
		});


		var start = new Date(2020, 2, 6)
		scheduler.init('scheduler_here',start,"timeline");

scheduler.parse([
   {id:1, section_id: 1, start_date:"03/06/2020 00:00", end_date:"03/06/2020 23:59", text:"Move me to 3/8"},
],"json");

#2

Here is a working example that shows the DST bug.

http://docs.dhtmlx.com/scheduler/snippet/982ebb89


#3

Hello Matt,
I’m awfully sorry for the delay. I tried to reproduce the issue, but when I move the event to 3/8, its duration is still one day. Please, watch the record:

https://recordit.co/h4xG7IN3nh
https://snippet.dhtmlx.com/5/a4c9ca506

If I am not doing what you exactly mean, please let me know the way how to reproduce the issue.


#4

I am seeing this issue on:
macOS 11.2.3
Chrome (Brave): Version 1.23.75 Chromium: 90.0.4430.93 (Official Build) (x86_64)
Safari: 14.0.3 (16610.4.3.1.7)

See attached recording of example at https://snippet.dhtmlx.com/5/a4c9ca506

Recording: https://forum.dhtmlx.com/uploads/default/original/2X/9/9e3b76d7d27b6abb6bfcdc17275f589bf04886c4.mov


#5

Hi Matt,
I understood. I will give you a reply on Monday.


#6

Hi Matt,
I replied you on email.


#7

Thank you for the reply.

The same workaround code did not solve the issue. It does not use timeline view like my provided example, and the event still appears as two days regardless of the output of the overridden function.