dateWithTimezone static method

DateTime dateWithTimezone(
  1. int year, [
  2. int month = 1,
  3. int day = 1,
  4. bool isUtc = false,
])

Implementation

static DateTime dateWithTimezone(
  int year, [
  int month = 1,
  int day = 1,
  bool isUtc = false,
]) {
  if (isUtc) {
    return DateTime.utc(
      year,
      month,
      day,
      0,
      0,
      0,
      0,
      0,
    );
  }
  return DateTime(
    year,
    month,
    day,
    0,
    0,
    0,
    0,
    0,
  );
}