Skip to content
Snippets Groups Projects
Verified Commit 8b6ee47b authored by Josef Schlehofer's avatar Josef Schlehofer
Browse files

user-notify: add timezone to timestamp of email notifications

This patch is already merged to user-notify repository, but until there
is tagged release, let's do it this way.
parent 8423005e
No related merge requests found
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=user-notify
PKG_VERSION:=61.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/user-notify.git
......
From 921787fef2e0142008551ba091aaba2a9c865f83 Mon Sep 17 00:00:00 2001
From: lathama <lathama@gmail.com>
Date: Sat, 23 Jul 2022 12:50:17 -0600
Subject: [PATCH] notifier: Add timezone to timestamp in email notification
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Now we get the exact restart time including the timezone.
It fixes the ambiguity of scheduled restart time, in case there are
multiple Turris devices located within different timezones.
Closes: #11
[Add timezone to cs timestamp as well.]
Co-authored-by: Martin Matějek <martin.matejek@nic.cz>
---
src/scripts/notifier | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scripts/notifier b/src/scripts/notifier
index b35688b..dc78ee8 100755
--- a/src/scripts/notifier
+++ b/src/scripts/notifier
@@ -160,9 +160,9 @@ schedule_restart() {
echo "reboot" | at -t "$wanted_time" 2> /dev/null
if [ "$lang" = "cs" ]; then
- echo -e "Zařízení bude automaticky restartováno dne $($date_cmd '+%d. %m. %Y v %H:%M' -d "$wanted_time").\n" >> "$1"
+ echo -e "Zařízení bude automaticky restartováno dne $($date_cmd '+%d. %m. %Y v %H:%M %Z' -d "$wanted_time").\n" >> "$1"
else
- echo -e "The device will be restarted automatically on $($date_cmd '+%A, %B %e at %I:%M %p' -d "$wanted_time").\n" >> "$1"
+ echo -e "The device will be restarted automatically on $($date_cmd '+%A, %B %e at %I:%M %p %Z' -d "$wanted_time").\n" >> "$1"
fi
}
--
GitLab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment