Fixes: - Improved the detection when sensor deactivation time is straddled between 2 days. - Improved the operation on CGI interface.