diff --git a/docker-compose.yml b/docker-compose.yml index 84262f28a..65504da2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: redis: - image: redis:7-alpine + image: redis:8-alpine ports: - 6379:6379 command: redis-server --save 60 1 --loglevel warning @@ -68,6 +68,7 @@ services: python3 manage.py runserver_plus 0.0.0.0:8000 --cert-file cert.crt" depends_on: - radicale + - redis volumes: - .:/code networks: diff --git a/frontend/src/components/account/AutoReplyForm.vue b/frontend/src/components/account/AutoReplyForm.vue index c3bdef981..9cdd0db04 100644 --- a/frontend/src/components/account/AutoReplyForm.vue +++ b/frontend/src/components/account/AutoReplyForm.vue @@ -104,10 +104,11 @@ async function submit() { accountApi.getARMessage().then((resp) => { form.value = resp.data if (form.value.fromdate) { - form.value.fromdate = form.value.fromdate.slice(0, -4) + form.value.fromdate = form.value.fromdate.slice(0, -6) + console.log(form.value.fromdate) } if (form.value.untildate) { - form.value.untildate = form.value.untildate.slice(0, -4) + form.value.untildate = form.value.untildate.slice(0, -6) } }) diff --git a/frontend/src/views/account/SettingsView.vue b/frontend/src/views/account/SettingsView.vue index 602ba8015..047f37314 100644 --- a/frontend/src/views/account/SettingsView.vue +++ b/frontend/src/views/account/SettingsView.vue @@ -1,50 +1,52 @@ diff --git a/modoboa/autoreply/models.py b/modoboa/autoreply/models.py index 8cf3802af..21ae1bda5 100644 --- a/modoboa/autoreply/models.py +++ b/modoboa/autoreply/models.py @@ -38,9 +38,9 @@ class ARmessage(models.Model): days = request.localconfig.parameters.get_value("tracking_period") context["fromdate"] = localize(self.fromdate) fromdate = self.fromdate.isoformat() - fromdate, tz = fromdate.split("+") - tz = f"+{tz.replace(':', '')}" - condition = [("currentdate", ":zone", tz, ":value", "ge", "iso8601", fromdate)] + datepart = fromdate[:-6] + tz = fromdate[-6:].replace(":", "") + condition = [("currentdate", ":zone", tz, ":value", "ge", "iso8601", datepart)] if self.untildate: context["untildate"] = localize(self.untildate) condition.append( @@ -51,7 +51,7 @@ class ARmessage(models.Model): ":value", "lt", "iso8601", - self.untildate.isoformat().split("+")[0], + self.untildate.isoformat()[:-6], ) ) content = self.content % context