toLocal method

  1. @override
LocalDateTime toLocal()
override

Returns this DateTime value in the local time zone.

Returns this DateTime if it is already in the local time zone. Otherwise this method is equivalent to:

DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch,
                                    isUtc: false)

Implementation

@override
// ignore: invalid_use_of_protected_member
LocalDateTime toLocal() => _local ??= LocalDateTime(year, month, day)..datePart = this;