我在计划应用程序中使用Moment.js,但是我观察到了意外的行为:当i在一天前工作的时间变化(今天为星期天)(在星期天可以执行相同的操作)。当不是我想要的时候,似乎可以预见到变化。 我尝试使用扩展名.utc()失败。感谢您的所有建议。
// return hour from x position
function getHeure(x) {
var dd = moment(heure0, "DD/MM/YYYY HH:mm:ss"); // heure0 contain day/hour of start
var gt = moment(dd).add(parseInt(x / granul),'m') // 'x' is the x point in planning, 'granul' the ratio of min/px
if (dd.date()==27 && dd.month()==9) gt.add(1,'hours') // current workaround for France in 2019...
return gt
}
我在计划应用程序中使用Moment.js,并且观察到意外的行为:当我在时间更改的一天(今天为...)之前工作时,该软件会计算不良时间(春季/冬季为+/- 1小时) >