Skip to content

Commit

Permalink
Use moment-timezone when using .tz() (#7653)
Browse files Browse the repository at this point in the history
refs #7449, refs #7514, refs #7643

- We've had a couple of issues raised, and a few people in #help all report the same error:
> Cannot read property 'zone' of undefined
When starting Ghost.

I'm not sure why this seems to work sometimes, and not others, however it would seem that we
should require moment-timezone anywhere we want to use timezone features.

This PR fixes the LOC shown in #7449 as the problem line + I searched for any other potential problems
  • Loading branch information
ErisDS authored and kirrg001 committed Oct 31, 2016
1 parent dfa073c commit 9a7ebee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/server/data/validation/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var schema = require('../schema').tables,
_ = require('lodash'),
validator = require('validator'),
moment = require('moment'),
moment = require('moment-timezone'),
assert = require('assert'),
Promise = require('bluebird'),
errors = require('../../errors'),
Expand Down
2 changes: 1 addition & 1 deletion core/server/helpers/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// Formats a date using moment-timezone.js. Formats published_at by default but will also take a date as a parameter

var moment = require('moment-timezone'),
var moment = require('moment-timezone'),
date,
timezone;

Expand Down

0 comments on commit 9a7ebee

Please sign in to comment.