Created instance generates DateTimes in past from <code>from</code> up to now

@return instance that generates DateTimes in past from <code>from</code> up to now
979513
public static Generator<DateTime> pastDates(@Nonnull DateTime from) {
        return new RandomJodaDateTimeGenerator(ofInstance(checkNotNull(from)), new DurationFromNow(ZERO_DURAION));
    }
556697
private synchronized Date dateTimeHelper() {
        // if we already have current values, then we can stop (note this
        // always means that we're caching)
        if (currentTime != null)
            return null;

        // get the current moment
        Date time = new Date();

        // if we're not caching then we just return the current moment
        if (! useCachedEnvValues) {
            return time;
        } else {
            // we're caching, so resolve all three values, making sure
            // to use clean copies of the date object since it may be
            // modified when creating the attributes
            currentTime = new TimeAttribute(time);
            currentDate = new DateAttribute(time);
            currentDateTime = new DateTimeAttribute(time);
            return null;
        }
        
    }
454818
public function getDateCreated() : DateTime
     {
        $rtn = $this->data['date_created'];

        if (!empty($rtn)) {
            $rtn = new DateTime($rtn);
        }

        return $rtn;
     }
617996
public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() {
    if (typeCase_ == 5) {
      return (com.google.protobuf.Timestamp) type_;
    }
    return com.google.protobuf.Timestamp.getDefaultInstance();
  }
1008206
@Override
    public ChronoZonedDateTime<D> with(TemporalAdjuster adjuster) {
        return toLocalDate().getChronology().ensureChronoZonedDateTime(super.with(adjuster));
    }
659385
public static final Renderer<Date> instance() { // NOPMD it's thread save!
    if (DateTimeLocalRenderer.instanceRenderer == null) {
      synchronized (DateTimeLocalRenderer.class) {
        if (DateTimeLocalRenderer.instanceRenderer == null) {
          DateTimeLocalRenderer.instanceRenderer =
              new DateTimeLocalRenderer("yyyy-MM-dd'T'HH:mm:ss");
        }
      }
    }
    return DateTimeLocalRenderer.instanceRenderer;
  }
284119
public static function now()
    {
        /** @var DBDatetime $now */
        $now = null;
        if (self::$mock_now) {
            $now = self::$mock_now;
        } else {
            $now = DBField::create_field('Datetime', time());
        }
        return $now;
    }
386905
public static JKTimeObject getCurrntTime() {
		JKTimeObject fsTimeObject = new JKTimeObject();
		Calendar instance = Calendar.getInstance();
		fsTimeObject.setYear(instance.get(Calendar.YEAR));
		fsTimeObject.setMonth(instance.get(Calendar.MONTH));
		fsTimeObject.setDay(instance.get(Calendar.DAY_OF_MONTH));
		fsTimeObject.setHour(instance.get(Calendar.HOUR_OF_DAY));
		fsTimeObject.setMunite(instance.get(Calendar.MINUTE));
		return fsTimeObject;
	}
571748
public ZonedDateTime getStartZonedDateTime() {
        if (zonedStartDateTime == null) {
            zonedStartDateTime = ZonedDateTime.of(startDate, startTime, zoneId);
        }

        return zonedStartDateTime;
    }
798926
public static DateTime toDateTime(org.joda.time.DateTime dateTime) {
    return dateTimesHelper.toDateTime(dateTime);
  }
1359543
public function getCreated()
    {
        $rtn    = $this->data['created'];

        if (!empty($rtn)) {
            $rtn    = new \DateTime($rtn);
        }
        
        return $rtn;
    }
1117790
public F getInstance() {
		return getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, TimeZone.getDefault(), Locale.getDefault());
	}
1018206
@Override
    public TimeZone cloneAsThawed() {
        JavaTimeZone tz = (JavaTimeZone)super.cloneAsThawed();
        tz.javatz = (java.util.TimeZone)javatz.clone();
        tz.javacal = new java.util.GregorianCalendar(javatz);  // easier than synchronized javacal.clone()
        tz.isFrozen = false;
        return tz;
    }
1002213
public static DateTimePatternGenerator getEmptyInstance() {
        DateTimePatternGenerator instance = new DateTimePatternGenerator();
        instance.addCanonicalItems();
        instance.fillInMissing();
        return instance;
    }
157519
@Override
    public Instant getCreatedDate() {
        try {
            if (hasProperty(FEDORA_CREATED)) {
                return ofEpochMilli(getTimestamp(FEDORA_CREATED, NO_TIME));
            }
            if (hasProperty(JCR_CREATED)) {
                return ofEpochMilli(getTimestamp(JCR_CREATED, NO_TIME));
            }
        } catch (final PathNotFoundException e) {
            throw new PathNotFoundRuntimeException(e);
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
        LOGGER.debug("Node {} does not have a createdDate", node);
        return null;
    }
1343392
public Date getAccessedDateTime() {

		long time = 0;

		if (atime != null) {
			time = atime.longValue() * 1000;
		}

		if (atime != null) {
			time += (atime_nano.longValue() / 1000000);
		}
		return new Date(time);
	}
1006372
public T toDateTime(DateTime dateTime) {
    try {
      D dateObj = dateClass.newInstance();
      PropertyUtils.setProperty(dateObj, "year", dateTime.getYear());
      PropertyUtils.setProperty(dateObj, "month", dateTime.getMonthOfYear());
      PropertyUtils.setProperty(dateObj, "day", dateTime.getDayOfMonth());

      T dateTimeObj = dateTimeClass.newInstance();
      PropertyUtils.setProperty(dateTimeObj, "date", dateObj);
      PropertyUtils.setProperty(dateTimeObj, "hour", dateTime.getHourOfDay());
      PropertyUtils.setProperty(dateTimeObj, "minute", dateTime.getMinuteOfHour());
      PropertyUtils.setProperty(dateTimeObj, "second", dateTime.getSecondOfMinute());
      // Starting in v201811, timeZoneID was renamed to timeZoneId
      if (PropertyUtils.isWriteable(dateTimeObj, "timeZoneID")) {
        PropertyUtils.setProperty(
            dateTimeObj, "timeZoneID", dateTime.getZone().toTimeZone().getID());
      } else {
        PropertyUtils.setProperty(
            dateTimeObj, "timeZoneId", dateTime.getZone().toTimeZone().getID());
      }

      return dateTimeObj;
    } catch (InstantiationException e) {
      throw new IllegalStateException("Could not instantiate class.", e);
    } catch (IllegalAccessException e) {
      throw new IllegalStateException("Could not instantiate class.", e);
    } catch (InvocationTargetException e) {
      throw new IllegalStateException("Could not set field.", e);
    } catch (NoSuchMethodException e) {
      throw new IllegalStateException("Could not set field.", e);
    }
  }