Ghost/core/server/overrides.js
Katharina Irrgang 94fdbdd267 🐛 move overrides into core folder (#7371)
closes #7336
- make sure overrides is still the first package to call
2016-09-14 15:50:17 +01:00

32 lines
1017 B
JavaScript

var moment = require('moment-timezone');
/**
* force UTC
* - you can require moment or moment-timezone, both is configured to UTC
* - you are allowed to use new Date() to instantiate datetime values for models, because they are transformed into UTC in the model layer
* - be careful when not working with models, every value from the native JS Date is local TZ
* - be careful when you work with date operations, therefor always wrap a date into moment
*/
moment.tz.setDefault('UTC');
// jscs:disable
var _ = require('lodash'),
toPairs = require('lodash.topairs'),
fromPairs = require('lodash.frompairs'),
toString = require('lodash.tostring'),
pickBy = require('lodash.pickby'),
uniqBy = require('lodash.uniqby'),
orderBy = require('lodash.orderby'),
omitBy = require('lodash.omitby');
/**
* lodash 4.x functions we use
*/
_.toPairs = toPairs;
_.fromPairs = fromPairs;
_.toString = toString;
_.omitBy = omitBy;
_.uniqBy = uniqBy;
_.pickBy = pickBy;
_.orderBy = orderBy;