nowWithTimezone static method

DateTime nowWithTimezone(
  1. bool isUtc
)

Implementation

static DateTime nowWithTimezone(bool isUtc) {
  if (isUtc) {
    return DateTime.now().toUtc();
  }

  return DateTime.now();
}