Fixed month in log entries used for logfile or stdout - was printing minutes

This commit is contained in:
IanR 2014-11-25 10:42:36 +00:00
parent 9a1a10b7aa
commit b3add97b1c

View file

@ -127,11 +127,11 @@ logmsg () {
echo "${LMSG}" | logger -t petrified echo "${LMSG}" | logger -t petrified
fi fi
if (( ${USE_STDOUT} == 1 )); then if (( ${USE_STDOUT} == 1 )); then
DTS=$(date +"%Y-%M-%d %H:%M:%S") DTS=$(date +"%Y-%m-%d %H:%M:%S")
echo "[${DTS}] [petrified] ${LMSG}" echo "[${DTS}] [petrified] ${LMSG}"
fi fi
if (( ${USE_LOGFILE} == 1 )); then if (( ${USE_LOGFILE} == 1 )); then
DTS=$(date +"%Y-%M-%d %H:%M:%S") DTS=$(date +"%Y-%m-%d %H:%M:%S")
echo "[${DTS}] [petrified] ${LMSG}" >> "${PET_LOG}" echo "[${DTS}] [petrified] ${LMSG}" >> "${PET_LOG}"
fi fi
return return