Returns this DateTime value in the local time zone.
Returns this
if it is already in the local time zone.
Otherwise this method is equivalent to:
new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
isUtc: false)
Source
/**
* Returns this DateTime value in the local time zone.
*
* Returns [this] if it is already in the local time zone.
* Otherwise this method is equivalent to:
*
* new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
* isUtc: false)
*/
DateTime toLocal() {
if (isUtc) {
return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
isUtc: false);
}
return this;
}