class TZInfo::DataSources::PosixTimeZoneParser
def get_offset_from_hms(h, m, s)
-
(InvalidPosixTimeZone)- if the mm and ss values are greater than
Returns:
-
(Integer)- the offset.
Parameters:
-
s(String) -- the seconds. -
m(String) -- the minutes. -
h(String) -- the hours.
def get_offset_from_hms(h, m, s) h = h.to_i m = m.to_i s = s.to_i raise InvalidPosixTimeZone, "Invalid minute #{m} in offset for POSIX-style time zone string." if m > 59 raise InvalidPosixTimeZone, "Invalid second #{s} in offset for POSIX-style time zone string." if s > 59 magnitude = (h.abs * 60 + m) * 60 + s h < 0 ? -magnitude : magnitude end