setSecond method

DateTime setSecond(
  1. int second, [
  2. int? millisecond,
  3. int? microsecond
])

Change second of this date

set millisecond if you want to change it as well, to skip an change other optional field set it as null set microsecond if you want to change it as well

Implementation

DateTime setSecond(
  int second, [
  int? millisecond,
  int? microsecond,
]) =>
    DateTime(
      year,
      month,
      day,
      hour,
      minute,
      second,
      millisecond ?? this.millisecond,
      microsecond ?? this.microsecond,
    );