LocalTime.fromDateTime constructor

LocalTime.fromDateTime(
  1. DateTime date
)

Creates a new LocalTime from the hour, minute, second, millisecond and microsecond properties of the given DateTime.

Note: Any date component of the DateTime is ignored.

Implementation

LocalTime.fromDateTime(DateTime date)
    : _date = DateTime.utc(1970, 1, 1, date.hour, date.minute, date.second,
          date.millisecond, date.microsecond);