summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-01-13 00:26:44 +0000
committerPeter Palfrader <peter@palfrader.org>2008-01-13 00:26:44 +0000
commitaf781684134feb6454547e1d3c7cbab5d42a10e3 (patch)
treee88d7114bf23790bfe8b7cd6238345045df6bed3
parent388b2f6221d69ef91ca16e631f2c24193ae566a8 (diff)
downloadtor-af781684134feb6454547e1d3c7cbab5d42a10e3.tar.gz
tor-af781684134feb6454547e1d3c7cbab5d42a10e3.zip
Fix error induced by timezone offset
svn:r13124
-rwxr-xr-xcontrib/nagios-check-tor-authority-cert2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/nagios-check-tor-authority-cert b/contrib/nagios-check-tor-authority-cert
index 15a6a9603b..d55dfa33a6 100755
--- a/contrib/nagios-check-tor-authority-cert
+++ b/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