Skip to content

Commit

Permalink
🐛 fix DST in listeners spec (#7652)
Browse files Browse the repository at this point in the history
no issue
- we need to calculate the timezone offset dynamically, because of DST
  • Loading branch information
kirrg001 committed Oct 31, 2016
1 parent 3ea8f7c commit 4e27f7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/test/integration/model/base/listeners_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
};
Expand Down

0 comments on commit 4e27f7a

Please sign in to comment.