aboutsummaryrefslogtreecommitdiff
path: root/lib/util.bash
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-26 21:06:02 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-26 21:06:02 +0200
commit08520fec143abd63000885f9d8fadb66ef203435 (patch)
tree292f1def3e5ec73af73c75038e19849f292ef624 /lib/util.bash
parente66e302cea1e562ac5030c3855d6e14fb0b64243 (diff)
Make datetime pass on -u in all cases
Diffstat (limited to 'lib/util.bash')
-rw-r--r--lib/util.bash5
1 files changed, 3 insertions, 2 deletions
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