From 4b9947da88ba789d6b2ce04e503286e853f6528c Mon Sep 17 00:00:00 2001
From: Ildar Kamalov <ik@adguard.com>
Date: Fri, 10 Nov 2023 17:04:56 +0300
Subject: [PATCH] Pull request: fix schedule timezone

Updates #6401

Squashed commit of the following:

commit 0ed83fd52fe8cf9bd5a8d438e81534799a7fdd83
Author: Ildar Kamalov <ik@adguard.com>
Date:   Fri Nov 10 16:09:04 2023 +0300

    ADG-7720 fix schedule timezone
---
 CHANGELOG.md                                                 | 2 ++
 client/src/components/Filters/Services/ScheduleForm/Modal.js | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 85fd714b..776007b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
 
 ### Fixed
 
+- Missing timezone on schedule form submission ([#6401]).
 - Average request processing time calculation ([#6220]).
 - Redundant shortening long client names in the Top Clients table ([#6338]).
 - Scrolling column headers in the tables ([#6337]).
@@ -60,6 +61,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
 [#6357]: https://github.com/AdguardTeam/AdGuardHome/issues/6357
 [#6358]: https://github.com/AdguardTeam/AdGuardHome/issues/6358
 [#6368]: https://github.com/AdguardTeam/AdGuardHome/issues/6368
+[#6401]: https://github.com/AdguardTeam/AdGuardHome/issues/6401
 
 <!--
 NOTE: Add new changes ABOVE THIS COMMENT.
diff --git a/client/src/components/Filters/Services/ScheduleForm/Modal.js b/client/src/components/Filters/Services/ScheduleForm/Modal.js
index 806146f9..f2812df3 100644
--- a/client/src/components/Filters/Services/ScheduleForm/Modal.js
+++ b/client/src/components/Filters/Services/ScheduleForm/Modal.js
@@ -81,6 +81,10 @@ export const Modal = ({
             };
         });
 
+        if (timezone !== intialTimezone) {
+            newSchedule.time_zone = timezone;
+        }
+
         onSubmit(newSchedule);
     };