Преглед изворни кода

修复屏蔽时间跨月及跨年bug

ellisran пре 1 година
родитељ
комит
fb06724f1b
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      app/extend/helper.js

+ 2 - 0
app/extend/helper.js

@@ -1692,6 +1692,8 @@ module.exports = {
         function parseTime(stime, timeStr, day = 0) {
             const [hours, minutes] = timeStr.split(':').map(Number);
             const date = new Date();
+            date.setFullYear(stime.getFullYear());
+            date.setMonth(stime.getMonth());
             date.setDate(stime.getDate() + day);
             date.setHours(hours, minutes, 0, 0); // Set hours and minutes, reset seconds and milliseconds
             return date;