toLocalDateTime method

LocalDateTime toLocalDateTime()

Converts this DateTime to a LocalDateTime, ignoring the timezone.

DateTime(2023, 10, 10, 10, 30).toLocalDateTime(); // LocalDateTime(2023, 10, 10, 10, 30)

DateTime.utc(2023, 10, 10, 10, 30).toLocalDateTime(); // LocalDateTime(2023, 10, 10, 10, 30)

Implementation

LocalDateTime toLocalDateTime() => LocalDateTime(year, month, day, hour, minute, second, millisecond, microsecond);