浏览代码

Fix error induced by timezone offset

svn:r13124
Peter Palfrader 16 年之前
父节点
当前提交
af78168413
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      contrib/nagios-check-tor-authority-cert

+ 1 - 1
contrib/nagios-check-tor-authority-cert

@@ -68,7 +68,7 @@ if ! [ -s "$TMPFILE" ] ; then
 fi
 
 expirydate="$(awk '$1=="dir-key-expires" {printf "%s %s", $2, $3}' < "$TMPFILE")"
-expiryunix=$(date -d "$expirydate" +%s)
+expiryunix=$(TZ=UTC date -d "$expirydate" +%s)
 now=$(date +%s)
 
 if [ "$now" -ge "$expiryunix" ]; then