mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
256b77b0e4
- We have an already established location for special rules based on db client - Removes the need to require config inside of overrides
18 lines
734 B
JavaScript
18 lines
734 B
JavaScript
/**
|
|
* If we enable bluebird debug logs we see a huge memory usage.
|
|
* You can reproduce by removing this line and import a big database export into Ghost.
|
|
* `NODE_ENV=development node index.js`
|
|
*/
|
|
process.env.BLUEBIRD_DEBUG = 0;
|
|
|
|
const 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');
|