Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Convert date time to string when print it out #604

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def self.getprotectionstatus()
elsif (datTime == "NA" || (Time.strptime(datTime, "%d-%m-%Y") < (Time.now - 7*24*3600))) &&
(datengupdate == "NA" || datengupdate < (Time.now - 7*24*3600).utc)
($ProtectionStatusRank, $ProtectionStatus) = AntimalwareCommon::SignaturesOutOfDateProtectionCode
protectionStatusDetailsArray.push("DAT and Engine update are out of 7 days: " + datengupdate)
protectionStatusDetailsArray.push("DAT and Engine update are out of 7 days: " + datengupdate.to_s)
end

if (!fullscan.nil? && fullscan != "NA")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ def self.getprotectionstatus()
sophosconfigpathArray[sophosconfigpathArray.length-1] = "savconfig"
sophosconfigpath = sophosconfigpathArray.join('/')
lpcmd = `#{sophosconfigpath} get LiveProtection 2>&1`.lines.map(&:chomp)

if !$?.success? || lpcmd.nil? || lpcmd.empty?
error += "live protection cmd failed; "
else
Expand Down