truncateToSecond property

LocalTime Function(LocalTime) truncateToSecond
getter/setter pair

Gets a time adjuster to truncate the time to the second, discarding fractional seconds.

Implementation

static LocalTime Function(LocalTime) truncateToSecond = (time) =>
    LocalTime(time.hourOfDay, time.minuteOfHour, time.secondOfMinute);