From 08520fec143abd63000885f9d8fadb66ef203435 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Thu, 26 May 2022 21:06:02 +0200
Subject: Make datetime pass on -u in all cases
---
lib/util.bash | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'lib')
diff --git a/lib/util.bash b/lib/util.bash
index da491bb..6ad69e1 100644
--- a/lib/util.bash
+++ b/lib/util.bash
@@ -24,14 +24,15 @@ chgdir() {
datetime() {
local date_opts
+ date_opts+=("-u")
+
# Apply SOURCE_DATE_EPOCH as the date to base off of.
if [[ $SOURCE_DATE_EPOCH ]]
then
date_opts+=("-d@$SOURCE_DATE_EPOCH")
- date_opts+=("-u")
fi
- date "${date_opts[@]}" +"${1:-%FT%T}"
+ date "${date_opts[@]}" +"${1:-%FT%TZ}"
}
# Log a message as error, and exit the program. This is intended for serious
--
cgit v1.1