public class Time extends Time
Differs from java.sql.Time when
serialized/deserialized in different timezones. Databases don't provide a
date and no timezone for a time, i.e. when sent over wire to different
locations a time should always remain the same for all timezones. In
java.sql.Time, however, the epochal time is serialized which may lead
to a different time when deserialized in another timezone. In Time
the effective date is serialized as HHMMSSmmm to provide the same semantics
as databases do.
| Constructor and Description |
|---|
Time()
Creates the current time.
|
Time(long time)
Constructs a
Time object using a milliseconds time value. |
| Modifier and Type | Method and Description |
|---|---|
Calendar |
getCalendar()
Gets the calendar for this date.
|
void |
setTime(long time) |
getDate, getDay, getMonth, getYear, setDate, setMonth, setYear, toInstant, toLocalTime, toString, valueOf, valueOfafter, before, clone, compareTo, equals, from, getHours, getMinutes, getSeconds, getTime, getTimezoneOffset, hashCode, parse, setHours, setMinutes, setSeconds, toGMTString, toLocaleString, UTCTentackle - a domain driven enterprise framework