now static method

DateTime now()

Returns the current DateTime. If a test time is set, returns that instead of the real time.

Implementation

static DateTime now() {
  return _testNow ?? DateTime.now();
}