Pārlūkot izejas kodu

Merge branch 'patch-1' into 'master'

Avoid date confusion in "age of backup" calculus

See merge request Mickael-Martin/zabbix_ynh!34
Mickael-Martin 6 gadi atpakaļ
vecāks
revīzija
7794aebb26

+ 1 - 1
sources/extra_files/app/etc_zabbix_zabbix_agentd.d_yunohost.sh

@@ -36,7 +36,7 @@ fi
 
 if [ "$1" == "yunohost.backups.ageoflastbackup" ] ;then
 	if [ $($yunobin backup list --output-as plain | wc -l) -ne 0 ] ;then
-		timestamp=$(date +"%d/%m/%Y %H:%M" -d"$($yunobin backup list -i | tail -n 4 | head -n 1 | grep -Po 'created_at: \K(.*)')")
+		timestamp=$(date +"%F %R" -d"$($yunobin backup list -i | tail -n 4 | head -n 1 | grep -Po 'created_at: \K(.*)')")
 		echo $(( ($(date +%s) - $(date -d"$timestamp" +%s))/(60*60*24) ))
 	else
 		echo "No backup detected"