toLocalTime method

LocalTime toLocalTime()

Converts this DateTime to a LocalTime, ignoring the timezone.

DateTime(2023, 10, 10, 10, 30).toLocalTime(); // LocalTime(10, 30)

DateTime.utc(2023, 10, 10, 10, 30).toLocalTime(); // LocalTime(10, 30)

Implementation

LocalTime toLocalTime() => LocalTime(hour, minute, second, millisecond, microsecond);