setTime static method

DateTime setTime(
  1. DateTime date,
  2. int hours,
  3. int minutes, [
  4. int seconds = 0,
  5. int milliseconds = 0,
  6. int microseconds = 0,
])

Creates a copy of date but with time replaced with the new values.

Implementation

static DateTime setTime(DateTime date, int hours, int minutes,
        [int seconds = 0, int milliseconds = 0, int microseconds = 0]) =>
    _date(date.isUtc, date.year, date.month, date.day, hours, minutes,
        seconds, milliseconds, microseconds);