Generating monthly report in January is failling
[2024-01-01 23:00:01,601][ERROR ][-][-][ThreadPoolExecutor-1_0][rdiffweb.core.notification] fail to send report to user laurexco
Traceback (most recent call last):
File "/opt/minarca-server/lib/python3.11/site-packages/rdiffweb/core/notification.py", line 322, in report_job
if self.send_report(userobj, _now=_now):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/minarca-server/lib/python3.11/site-packages/rdiffweb/core/notification.py", line 342, in send_report
start_time = now.replace(month=now.month - 1, day=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/minarca-server/lib/python3.11/site-packages/rdiffweb/core/librdiff.py", line 300, in replace
_time_seconds = calendar.timegm((year, month, day, hour, minute, second, -1, -1, 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/calendar.py", line 656, in timegm
days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: month must be in 1..12
Report are not send due to wrong date calculation