Method: Tem::Cert.extract_not_before

Defined in:
lib/tem/_cert.rb

.extract_not_before(tag) ⇒ Object

returns a Time



100
101
102
103
104
105
106
107
108
# File 'lib/tem/_cert.rb', line 100

def self.extract_not_before(tag)
  time_array = tag[4..7]
  offset_in_sec = 0
  for i in (0..time_array.length-1)
    offset_in_sec = offset_in_sec << 8
    offset_in_sec += time_array[i]
  end
  return Time.at(offset_in_sec)
end