From be183f3441dac5b90992a37cd3761f3e54f45c4c Mon Sep 17 00:00:00 2001 From: Katharina Irrgang Date: Mon, 31 Oct 2016 12:46:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=20fix=20DST=20in=20listeners=20?= =?UTF-8?q?spec=20(#7652)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue - we need to calculate the timezone offset dynamically, because of DST --- core/test/integration/model/base/listeners_spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/test/integration/model/base/listeners_spec.js b/core/test/integration/model/base/listeners_spec.js index ed972a7352..44942995c3 100644 --- a/core/test/integration/model/base/listeners_spec.js +++ b/core/test/integration/model/base/listeners_spec.js @@ -13,11 +13,13 @@ var should = require('should'), describe('Models: listeners', function () { var eventsToRemember = {}, + now = moment(), scope = { posts: [], publishedAtFutureMoment1: moment().add(2, 'days').startOf('hour'), publishedAtFutureMoment3: moment().add(10, 'hours').startOf('hour'), - timezoneOffset: -480, + // calculate the offset dynamically, because of DST + timezoneOffset: moment.tz.zone('Europe/London').offset(now) - moment.tz.zone('America/Los_Angeles').offset(now), newTimezone: 'America/Los_Angeles', oldTimezone: 'Europe/London' };