About Time Data
The Time class deals with hours, minutes, and seconds. When you create a new Time object, you must pass it the hour, minute, and second. The Time class uses the ISO hh-mm-ss format. Hours are represented by numbers between 0 and 23. Minutes and seconds are represented by numbers between 0 and 59. Use the Time.valueOf(String) method to convert an “hh-mm-ss” string to a Time object and use the ?.toString() method to return a Time object to its string (hh-mm-ss) representation.
The Time class extends the Date class. Both the Time and Date class use most of the same methods. For a description of Time literals, see Time Literals.