mirror of https://github.com/nextcloud/calendar
fix two timezone select bugs (#756)
* fix automatic reloading when changing from timezone to automatic Signed-off-by: Georg Ehrke <developer@georgehrke.com> * we need to convert UTC now as well, as people can select a timezone that does not necessarily match their browsers utc offset Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
6fc53220ee
commit
fa87083cfc
|
@ -67,7 +67,12 @@ app.controller('SettingsController', ['$scope', '$uibModal', '$timeout', 'Timezo
|
|||
settings.timezone = $scope.timezone;
|
||||
|
||||
if (fc.elm) {
|
||||
fc.elm.fullCalendar('option', 'timezone', settings.timezone);
|
||||
let timezone = settings.timezone;
|
||||
if (settings.timezone === 'automatic') {
|
||||
timezone = TimezoneService.getDetected();
|
||||
}
|
||||
|
||||
fc.elm.fullCalendar('option', 'timezone', timezone);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ app.factory('VEvent', function(TimezoneService, FcEvent, SimpleEvent, ICalFactor
|
|||
*/
|
||||
context.needsTzConversion = function(dt) {
|
||||
return (dt.icaltype !== 'date' &&
|
||||
dt.zone !== ICAL.Timezone.utcTimezone &&
|
||||
dt.zone !== ICAL.Timezone.localTimezone);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue