toDateTime method

DateTime toDateTime([
  1. Location? location
])

Implementation

DateTime toDateTime([Location? location]) {
  if (location != null) {
    return TZDateTime(location, year ?? 1971, month ?? 1, day ?? 1);
  } else {
    return DateTime(year ?? 1971, month ?? 1, day ?? 1);
  }
}