mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Fix wrong date headers after crossing DST east of Greenwich
This commit is contained in:
parent
51873f80c2
commit
f3d166a6c5
@ -1709,18 +1709,19 @@ app.classes.calendar = AppJS.extend(
|
||||
{
|
||||
var val = {
|
||||
id: ""+date.getUTCFullYear() + sprintf("%02d",date.getUTCMonth()) + sprintf("%02d",date.getUTCDate()),
|
||||
start_date: new Date(date),
|
||||
end_date: new Date(date),
|
||||
start_date: date.toJSON(),
|
||||
end_date: new Date(date.toJSON()),
|
||||
owner: state.state.owner
|
||||
};
|
||||
val.end_date.setUTCHours(24*7-1);
|
||||
val.end_date = val.end_date.toJSON();
|
||||
value.push(val);
|
||||
date.setUTCHours(24*7);
|
||||
}
|
||||
state.state.last=val.end_date;
|
||||
break;
|
||||
default:
|
||||
var end = state.state.last = view.end_date(state.state);
|
||||
var end = state.state.last = view.end_date(state.state).toJSON();
|
||||
for(var owner = 0; owner < grid_count && owner < state.state.owner.length; owner++)
|
||||
{
|
||||
value.push({
|
||||
@ -1732,7 +1733,6 @@ app.classes.calendar = AppJS.extend(
|
||||
}
|
||||
break;
|
||||
}
|
||||
state.state.last = state.state.last.toJSON()
|
||||
// If we have cached data for the timespan, pass it along
|
||||
this._need_data(value,state.state);
|
||||
if(grid)
|
||||
@ -2584,7 +2584,8 @@ app.classes.calendar = AppJS.extend(
|
||||
date.setUTCDate(1);
|
||||
date.setFullYear(year);
|
||||
date.setUTCMonth(month-1);
|
||||
var state = {date: date};
|
||||
// Use toJSON() to get UTC, not browser timezone
|
||||
var state = {date: date.toJSON()};
|
||||
if(app.calendar.sidebox_changes_views.indexOf(app.calendar.state.view) >= 0)
|
||||
{
|
||||
state.view = 'month';
|
||||
|
@ -215,8 +215,8 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea
|
||||
else if(typeof _date === "string")
|
||||
{
|
||||
// Need a new date to avoid invalid month/date combinations when setting
|
||||
// month then day
|
||||
this._parent.date_helper.set_value(new Date(_date.substring(0,4),_date.substring(4,6)-1,_date.substring(6,8),-new Date().getTimezoneOffset()/60,0,0));
|
||||
// month then day. Use a string to avoid browser timezone.
|
||||
this._parent.date_helper.set_value(_date.substring(0,4)+'-'+(_date.substring(4,6))+'-'+_date.substring(6,8)+'T00:00:00Z');
|
||||
}
|
||||
|
||||
this.date = new Date(this._parent.date_helper.getValue());
|
||||
|
@ -506,7 +506,7 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
|
||||
var rowHeight = (100/rowsToDisplay).toFixed(1);
|
||||
// Pixels
|
||||
this.rowHeight = this.div.height() / rowsToDisplay;
|
||||
debugger;
|
||||
|
||||
this.gridHeader
|
||||
.empty()
|
||||
.attr('data-date', this.options.start_date)
|
||||
|
Loading…
Reference in New Issue
Block a user