Method: AEMO::Time.parse_timestamp12

Defined in:
lib/aemo/time.rb

.parse_timestamp12(string) ⇒ Time

Parse a 12 character timestamp.

Raises:



59
60
61
62
63
# File 'lib/aemo/time.rb', line 59

def parse_timestamp12(string)
  raise AEMO::TimeError unless string.match(TIMESTAMP12_PATTERN)

  ::Time.find_zone(NEMTIMEZONE).strptime(string, TIMESTAMP12)
end