Method: AEMO::Time.parse_timestamp14

Defined in:
lib/aemo/time.rb

.parse_timestamp14(string) ⇒ Time

Parse a 14 character timestamp.

Parameters:

  • string (String)

Returns:

Raises:

[View source]

49
50
51
52
53
# File 'lib/aemo/time.rb', line 49

def parse_timestamp14(string)
  raise AEMO::TimeError unless string.match(TIMESTAMP14_PATTERN)

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