mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-24 11:46:30 +00:00
don't attempt to set empty date
This commit is contained in:
parent
1e3559c8b7
commit
5d570f6333
@ -40,6 +40,7 @@ source $conf
|
||||
|
||||
set_current_date_http() {
|
||||
date_str=$(curl -v -s -m $date_timeout -X GET http://$date_host 2>&1 | grep Date | sed -e 's/< Date: //')
|
||||
test -z "$date_str" && return 1
|
||||
date -u -D "%a, %d %b %Y %H:%M:%S" -s "$date_str" > /dev/null
|
||||
return $?
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user