class TZInfo::DataSources::PosixTimeZoneParser

def get_seconds_after_midnight_from_hms(h, m, s)

Raises:
  • (InvalidPosixTimeZone) - if the mm and ss values are greater than

Returns:
  • (Integer) - the number of seconds after midnight.

Parameters:
  • s (String) -- the seconds past the minute.
  • m (String) -- the minutes past the hour.
  • h (String) -- the hour.
def get_seconds_after_midnight_from_hms(h, m, s)
  h = h.to_i
  m = m.to_i
  s = s.to_i
  raise InvalidPosixTimeZone, "Invalid minute #{m} in time for POSIX-style time zone string." if m > 59
  raise InvalidPosixTimeZone, "Invalid second #{s} in time for POSIX-style time zone string." if s > 59
  (h * 3600) + m * 60 + s
end