I'm using the DHTMLX Scheduler in my web app and want to get the data for each event and found a way to do it with scheduler._events which returns this:
1581498064943: {…}
_eday: 2
_end_date: undefined
_first_chunk: true
_last_chunk: true
_length: 1
_sday: 1
_sorder: 0
_sweek: 0
_timed: true
end_date: Date Tue Jan 02 2018 00:05:00 GMT+0100 (Central European Standard Time)
event_length: ""
event_pid: ""
id: 1581498064943
rec_pattern: ""
rec_type: ""
start_date: Date Tue Jan 02 2018 00:00:00 GMT+0100 (Central European Standard Time)
text: "New event"
the problem is when I convert it into a string to store it as a JSON later, JavaScript converts dates into iso 8601 and loses a day in the conversion:
"1581498064943": {
"start_date": "2018-01-01T23:00:00.000Z",
"end_date": "2018-01-01T23:05:00.000Z",
"text": "New event",
"id": 1581498064943,
"_timed": true,
"_sday": 1,
"_eday": 2,
"_length": 1,
"_sweek": 0,
"_sorder": 0,
"_first_chunk": true,
"_last_chunk": true,
"event_pid": "",
"event_length": "",
"rec_pattern": "",
"rec_type": ""
2018-01-02 becomes 2018-01-01