Module: CVESchema::CVE::Timestamp
- Defined in:
- lib/cve_schema/cve/timestamp.rb
Class Method Summary collapse
-
.parse(timestamp) ⇒ DateTime
Parses a CVE timestamp (ISO 8601).
Class Method Details
.parse(timestamp) ⇒ DateTime
Parses a CVE timestamp (ISO 8601).
18 19 20 21 22 |
# File 'lib/cve_schema/cve/timestamp.rb', line 18 def self.parse() DateTime.iso8601() rescue Date::Error raise InvalidJSON.new("invalid ISO-8601 timestamp: #{.inspect}") end |