Ghost/test/unit/server/overrides.test.js
Daniel Lockyer 1fd980ee9b Set global Luxon timezone override to UTC
refs https://linear.app/tryghost/issue/CORE-113/start-off-luxon-refactor

- we're planning on switching to Luxon for our date/timezone library,
  eventually replacing `moment` and `moment-timezone`
- the first step is to set the global timezone override to UTC, which is
  done in `core/server/overrides.js`
- also adds a test to ensure we're setting the timezone correctly
- this was mostly pulled from https://moment.github.io/luxon/#/zones?id=changing-the-default-zone
2021-10-20 09:19:29 +02:00

11 lines
273 B
JavaScript

const should = require('should');
const luxon = require('luxon');
require('../../../core/server/overrides');
describe('Overrides', function () {
it('sets global timezone to UTC', function () {
should.equal(luxon.DateTime.local().zoneName, 'UTC');
});
});