--- /dev/null
+import moment from '../../moment';
+
+export function isNearSpringDST() {
+ return moment().subtract(1, 'day').utcOffset() !== moment().add(1, 'day').utcOffset();
+}
-import { module, test } from '../qunit';
+import { module, test, expect } from '../qunit';
import moment from '../../moment';
+import { isNearSpringDST } from '../helpers/dst';
module('zone switching');
});
test('utc to local, keepLocalTime = true', function (assert) {
+ // Don't test near the spring DST transition
+ if (isNearSpringDST()) {
+ expect(0);
+ return;
+ }
+
var um = moment.utc(),
fmt = 'YYYY-DD-MM HH:mm:ss';
});
test('zone to local, keepLocalTime = true', function (assert) {
+ // Don't test near the spring DST transition
+ if (isNearSpringDST()) {
+ expect(0);
+ return;
+ }
+
var m = moment(),
fmt = 'YYYY-DD-MM HH:mm:ss',
z;