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

[Fix] invalid April user stats

Issue influenced by DST change in march

Reference: https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-in-date-strings.html

Relates to https://github.com/hestiacp/hestiacp/commit/90792221bd24bde3dbef9cc92a053a8cc2d49c2a

Fixes #755
Robert Zollner пре 5 година
родитељ
комит
bfd7b480c5
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      bin/v-update-user-stats

+ 1 - 1
bin/v-update-user-stats

@@ -73,7 +73,7 @@ for user in $user_list; do
     fi
     USER_DATA=$HESTIA/data/users/$user
     source $USER_DATA/user.conf
-    next_month=$(date +'%m/01/%y' -d "$(date +%Y-%m-%d) 1 month")
+    next_month=$(date +'%m/01/%y' -d "$(date +%Y-%m-15) 1 month")
     DATE=$(date -d "$next_month -1day" +%F)
 
     # Compiling report string