Fix today button always went to yesterday east of GMT

This commit is contained in:
Nathan Gray 2015-11-23 17:14:52 +00:00
parent 8e90df65e1
commit 88a9bd6583

View File

@ -2806,7 +2806,7 @@ app.classes.calendar = AppJS.extend(
.addClass('et2_clickable')
.on('click', function() {
var tempDate = new Date();
var today = new Date(tempDate.getFullYear(), tempDate.getUTCMonth(), tempDate.getUTCDate());
var today = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(),0,-tempDate.getTimezoneOffset(),0);
app.calendar.update_state({date: today.toJSON()});
});
var position_today = function() {