2016-09-14 17:50:17 +03:00
|
|
|
var moment = require('moment-timezone');
|
2016-06-03 11:06:18 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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');
|