In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 12:
. /usr/html/axis-cgi/lib/functions.sh
  ^-- SC1091 (info): Not following: /usr/html/axis-cgi/lib/functions.sh was not specified as input (see shellcheck -x).


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 18:
QUERY=
^---^ SC2034 (warning): QUERY appears unused. Verify use (or export if used externally).


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 25:
	logger -p info -t$0 -- $* || echo "$0: logger failed!" >&
                         ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
                               ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	logger -p info -t"$0" -- "$*" || echo "$0: logger failed!" >&2


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 29:
	logger -p err -t$0 -- $* || echo "$0: logger failed!" >&
                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
                              ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	logger -p err -t"$0" -- "$*" || echo "$0: logger failed!" >&2


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 40:
	local month=$1 year=$2
        ^-----------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                    ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	local month="$1" year="$2"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 50:
			if [ $(($year % 4)) -eq 0 ] && [ $(($year % 100)) -ne 0 ] ||
                                ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
                                                            ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 51:
			   [ $(($year % 400)) -eq 0 ]; then
                                ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 68:
	local err_msg=
        ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 93:
			err_msg="Invalid timezone '$2'. Allowed value: GMT."
                                 ^----------------^ SC2089 (warning): Quotes/backslashes will be treated literally. Rewrite using set/"$@" or functions.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 96:
	__cgi_errhd 200 $ERR_MSG_START $err_msg
                        ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                       ^------^ SC2090 (warning): Quotes/backslashes in this variable will not be respected.
                                       ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	__cgi_errhd 200 "$ERR_MSG_START" "$err_msg"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 104:
	local curdate year month day hour minute second calc_local date_opts
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 105:
	local sync_source tv_seconds result
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 112:
		__cgi_errhd 200 $ERR_MSG_START "Internal error." \
                                ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		__cgi_errhd 200 "$ERR_MSG_START" "Internal error." \


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 134:
		__cgi_errhd 200 $ERR_MSG_START "Internal error." \
                                ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		__cgi_errhd 200 "$ERR_MSG_START" "Internal error." \


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 142:
	set -- $curdate
               ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	set -- "$curdate"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 157:
	[ $year -lt $MIN_YEAR ] || [ $year -gt $MAX_YEAR ] &&
          ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                     ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ "$year" -lt $MIN_YEAR ] || [ "$year" -gt $MAX_YEAR ] &&


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 165:
	[ $month -lt 1 ] || [ $month -gt 12 ] &&
          ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                              ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ "$month" -lt 1 ] || [ "$month" -gt 12 ] &&


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 168:
	maxday $month $year
               ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                      ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	maxday "$month" "$year"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 175:
	[ $day -lt 1 ] || [ $day -gt $MAX_DAY ] &&
          ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
                            ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ "$day" -lt 1 ] || [ "$day" -gt $MAX_DAY ] &&


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 183:
	[ $hour -lt 0 ] || [ $hour -gt 23 ] &&
          ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.
                             ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ "$hour" -lt 0 ] || [ "$hour" -gt 23 ] &&


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 191:
	[ $minute -lt 0 ] || [ $minute -gt 59 ] &&
          ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ "$minute" -lt 0 ] || [ "$minute" -gt 59 ] &&


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 199:
	[ $second -lt 0 ] || [ $second -gt 59 ] &&
          ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ "$second" -lt 0 ] || [ "$second" -gt 59 ] &&


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 205:
		[ -z $tv_seconds ]; then
                     ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		[ -z "$tv_seconds" ]; then


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 211:
		$tv_seconds 0 2>&1); then
                ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		"$tv_seconds" 0 2>&1); then


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 215:
				__cgi_hdgen $CGI_HDGEN
                                            ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
				__cgi_hdgen "$CGI_HDGEN"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 219:
				__cgi_errhd 200 $ERR_MSG_START "Internal error." \
                                                ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
				__cgi_errhd 200 "$ERR_MSG_START" "Internal error." \


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 225:
		__cgi_errhd 200 $ERR_MSG_START "Internal error." \
                                ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		__cgi_errhd 200 "$ERR_MSG_START" "Internal error." \


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 235:
	local curdate
        ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 238:
		__cgi_errhd 200 $ERR_MSG_START \
                                ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		__cgi_errhd 200 "$ERR_MSG_START" \


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 243:
	__cgi_hdgen $CGI_HDGEN
                    ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	__cgi_hdgen "$CGI_HDGEN"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 245:
	printf "$curdate"
               ^--------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 252:
	local date
        ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 256:
	__cgi_hdgen $CGI_HDGEN
                    ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	__cgi_hdgen "$CGI_HDGEN"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 258:
	printf $date
               ^---^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".
               ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	printf "$date"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 265:
	local date
        ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 269:
	__cgi_hdgen $CGI_HDGEN
                    ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	__cgi_hdgen "$CGI_HDGEN"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 271:
	printf $date
               ^---^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo".
               ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	printf "$date"


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 279:
	local systime sysdate sync_source tv_seconds result
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 292:
	sysdate=$(echo $sysdate | tr '.' '-')
                       ^------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	sysdate=$(echo "$sysdate" | tr '.' '-')


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 295:
			$tv_seconds 0 2>&1) || err "Failed to set date."
                        ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			"$tv_seconds" 0 2>&1) || err "Failed to set date."


In /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/sbin/date.cgi line 302:
			__cgi_hdgen $CGI_HDGEN
                                    ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			__cgi_hdgen "$CGI_HDGEN"

For more information:
  https://www.shellcheck.net/wiki/SC2034 -- QUERY appears unused. Verify use ...
  https://www.shellcheck.net/wiki/SC2048 -- Use "$@" (with quotes) to prevent...
  https://www.shellcheck.net/wiki/SC2089 -- Quotes/backslashes will be treate...