Переглянути джерело

fix dynamic timezone change

Adam Shaw 8 роки тому
батько
коміт
9db2d02eef
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      src/models/EventManager.js

+ 2 - 1
src/models/EventManager.js

@@ -19,7 +19,8 @@ var EventManager = Class.extend(EmitterMixin, ListenerMixin, {
 		if (
 		if (
 			force ||
 			force ||
 			!this.currentPeriod ||
 			!this.currentPeriod ||
-			!this.currentPeriod.isWithinRange(start, end)
+			!this.currentPeriod.isWithinRange(start, end) ||
+			timezone !== this.currentPeriod.timezone
 		) {
 		) {
 			this.setPeriod( // will change this.currentPeriod
 			this.setPeriod( // will change this.currentPeriod
 				new EventPeriod(start, end, timezone)
 				new EventPeriod(start, end, timezone)