dfdatetime.DateTimeValues: change time or None if not available.
492917
def change_time(self):
    """"""
    timestamp = self._fsntfs_file_entry.get_entry_modification_time_as_integer()
    return dfdatetime_filetime.Filetime(timestamp=timestamp)
644881
def reset(self, value=None):
    

    if value is None:
      value = time.clock()
    self.start = value
    if self.value_on_reset:
      self.value = self.value_on_reset
856862
def is_missing(data, missing_value):
    
    if is_float(data) and isnan(missing_value):
        return isnan(data)
    elif is_datetime(data) and isnat(missing_value):
        return isnat(data)
    return (data == missing_value)
977643
def _set_thing(self, thing, value):
        """"""
        try:
            value = int(value)
        except (TypeError, ValueError):
            raise TypeError(
                f'Changing the {thing} of a `Date` instance is only '
                f'allowed via numbers, but the given value `{value}` '
                f'is of type `{type(value)}` instead.')
        kwargs = {}
        for unit in ('year', 'month', 'day', 'hour', 'minute', 'second'):
            kwargs[unit] = getattr(self, unit)
        kwargs[thing] = value
        self.datetime = datetime.datetime(**kwargs)
685218
@Override
	public BaseDateTimeType setValue(Date theValue) {
		if (myTimeZoneZulu == false && myTimeZone == null) {
			myTimeZone = TimeZone.getDefault();
		}
		myPrecision = getDefaultPrecisionForDatatype();
		BaseDateTimeType retVal = (BaseDateTimeType) super.setValue(theValue);
		return retVal;
	}
677851
def set_options(
        self,
        time_reset: int = 60,
        time_repeat: int = 0,
        repeat: int = 0,
        changes: int = 10,
    ) -> None:
        """"""
        self._time_reset = time_reset
        self._time_repeat = time_repeat
        self._repeat = repeat
        self._changes = changes
142867
def to_datetime_with_default(value, default_value):
        
        result = DateTimeConverter.to_nullable_datetime(value)
        return result if result != None else DateTimeConverter.to_utc_datetime(default_value)
714326
def _parse_datetime_default_value(property_name, default_value_string):
    """"""
    # OrientDB doesn't use ISO-8601 datetime format, so we have to parse it manually
    # and then turn it into a python datetime object. strptime() will raise an exception
    # if the provided value cannot be parsed correctly.
    parsed_value = time.strptime(default_value_string, ORIENTDB_DATETIME_FORMAT)
    return datetime.datetime(
        parsed_value.tm_year, parsed_value.tm_mon, parsed_value.tm_mday,
        parsed_value.tm_hour, parsed_value.tm_min, parsed_value.tm_sec, 0, None)
162121
def to_date(value, default=None):
    
    if isinstance(value, DateTime):
        return value
    if not value:
        if default is None:
            return None
        return to_date(default)
    try:
        if isinstance(value, str) and '.' in value:
            # https://docs.plone.org/develop/plone/misc/datetime.html#datetime-problems-and-pitfalls
            return DateTime(value, datefmt='international')
        return DateTime(value)
    except (TypeError, ValueError, DateTimeError):
        return to_date(default)
1375046
def Datetime(null=True, **kwargs):
    """"""
    return Property(
        types=datetime.datetime,
        convert=util.local_timezone,
        load=dateutil.parser.parse,
        null=null,
        **kwargs
    )
958272
def update_datetime(value, range = None):
        
        range = range if range != None else 10
        if range < 0:
            return value
        
        days = RandomFloat.next_float(-range, range)

        return value + datetime.timedelta(days)
1128909
private DateTime providedOrDefaultFromValue(DateTime from, DateTime to,
			AggregateCounterResolution resolution) {
		if (from != null) {
			return from;
		}
		switch (resolution) {
		case minute:
			return to.minusMinutes(59);
		case hour:
			return to.minusHours(23);
		case day:
			return to.minusDays(6);
		case month:
			return to.minusMonths(11);
		case year:
			return to.minusYears(4);
		default:
			throw new IllegalStateException(
					"Shouldn't happen. Unhandled resolution: " + resolution);
		}
	}
601151
private static long valuedt(TemporalAccessor datetime, ZoneId otherTimezoneOffset) {
        ZoneId alternativeTZ = Optional.ofNullable(otherTimezoneOffset).orElse(ZoneOffset.UTC);
        if (datetime instanceof LocalDateTime) {
            return ((LocalDateTime) datetime).atZone(alternativeTZ).toEpochSecond();
        } else if (datetime instanceof ZonedDateTime) {
            return ((ZonedDateTime) datetime).toEpochSecond();
        } else if (datetime instanceof OffsetDateTime) {
            return ((OffsetDateTime) datetime).toEpochSecond();
        } else {
            throw new RuntimeException("valuedt() for " + datetime + " but is not a FEEL date and time " + datetime.getClass());
        }
    }
214139
def modification_time(self):
    """"""
    timestamp = getattr(
        self._cpio_archive_file_entry, 'modification_time', None)
    if timestamp is None:
      return None
    return dfdatetime_posix_time.PosixTime(timestamp=timestamp)
1348386
def change_interval(self, value):
        
        assert not isinstance(value, string_types)
        self.timestamps = []

        for timestamp in value:
            event = EventTime(timestamp)
            self.timestamps.append(event)
281883
def parse_datetime(value):
    
    if not value:
        return None
    elif isinstance(value, datetime.datetime):
        return value
    return dateutil.parser.parse(value)
649792
def date_to_datetime(d):
    
    if not isinstance(d, datetime):
        d = datetime.combine(d, datetime.min.time())
    return d