1、上传moment-timezone-with-data.js到\public\assets\libs\moment
2、增加引入\public\assets\js\require-backend.js(paths配置)
'moment-timezone-with-data': '../libs/moment/moment-timezone-with-data',
3、修改表格时间时区\public\assets\js\backend.js
define(['fast', 'template', 'moment','moment-timezone-with-data'], function (Fast, Template, Moment,momentTimezoneWithData) {
// 这里设置为印度时区
Moment.tz.setDefault("Asia/Kolkata");
...
}
4、修改表单时间时区\public\assets\libs\bootstrap-daterangepicker\daterangepicker.js
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Make globaly available as well
define(['moment', 'jquery','moment-timezone-with-data'], function (moment, jquery,momentTimezoneWithData) {
if (!jquery.fn) jquery.fn = {}; // webpack server rendering
return factory(moment, jquery,momentTimezoneWithData);
});
...
}
}(this, function(moment, $) {
// 这里设置为印度时区
moment.tz.setDefault("Asia/Kolkata");
...
})
5、大功告成!