[FIX] web_calendar: timezone on event display regression

In fb05d884 event that were not displayed for arabic were fixed but
there could be an error when displaying timezone caused by this change.

As said in https://fullcalendar.io/docs1/event_data/ignoreTimezone/ the
ignoreTimezone parameter is set to `true` by default in FullCalendar 1
(this is not the case in current FullCalendar).

So there is two way to solves this time zone issue:

- keep fb05d884 and have the parameter ignoreTimezone set to `false`
- use momentjs `.toString()` to get a javascript english date string
  which will thereafter be parsed by javascript `new Date()`.

This commit use the second way since it is nearer what was originaly and
hopefully safer.

opw-705752

momentjs doc on toString: http://momentjs.com/docs/#/displaying/as-string/
This commit is contained in:
Nicolas Lempereur
2017-03-20 17:54:03 +01:00
parent 177a25ff10
commit 9dbd6d21e1
@@ -639,8 +639,8 @@ var CalendarView = View.extend({
date_stop = m_start.toDate();
}
var r = {
'start': moment(date_start).toISOString(),
'end': moment(date_stop).toISOString(),
'start': moment(date_start).toString(),
'end': moment(date_stop).toString(),
'title': the_title,
'allDay': (this.fields[this.date_start].type == 'date' || (this.all_day && evt[this.all_day]) || false),
'id': evt.id,