dfdatetime.DateTimeValues: creation time or None if not available.
517940
def creation_time(self):
    """"""
    timestamp = self._fsntfs_file_entry.get_creation_time_as_integer()
    return dfdatetime_filetime.Filetime(timestamp=timestamp)
352506
def convert_datetime(value, parameter):
    '''
    
    '''
    value = _check_default(value, parameter, ( '', '-', None ))
    if value is None or isinstance(value, datetime.datetime):
        return value
    for fmt in settings.DATETIME_INPUT_FORMATS:
        try:
            return datetime.datetime.strptime(value, fmt)
        except (ValueError, TypeError):
            continue
    raise ValueError("`{}` does not match a format in settings.DATETIME_INPUT_FORMATS".format(value))
1004171
def quote_datetime(self, value):
        
        if value:
            if isinstance(value, type_check):
                self._quote_datetime = parse(value)
            elif isinstance(value, datetime.datetime):
                self._quote_datetime = value
418355
def value_as_date(self):
        ''' 
        '''
        if self.value is None:
            return None
        v1, v2 = self.value
        if isinstance(v1, numbers.Number):
            dt = datetime.utcfromtimestamp(v1 / 1000)
            d1 = date(*dt.timetuple()[:3])
        else:
            d1 = v1
        if isinstance(v2, numbers.Number):
            dt = datetime.utcfromtimestamp(v2 / 1000)
            d2 = date(*dt.timetuple()[:3])
        else:
            d2 = v2
        return d1, d2
1039649
def _GetDateTime(self, filetime):
    
    if filetime == 0:
      return dfdatetime_semantic_time.SemanticTime('Not set')

    return dfdatetime_filetime.Filetime(timestamp=filetime)
1309841
def dateTimeRect( self, dateTime ):
        
        data = self._dateTimeGrid.get(dateTime.toTime_t())
        if ( data ):
            return QRectF(data[1])
        return QRectF()
89713
function(value) {
    var d = FxoUtils.parseDateTimeField(value);
    return d.valid ? d.parsed.getTime() : NaN;
  }
289338
@Override
    public ChronoZonedDateTime<D> with(TemporalField field, long newValue) {
        if (field instanceof ChronoField) {
            ChronoField f = (ChronoField) field;
            switch (f) {
                case INSTANT_SECONDS: return plus(newValue - toEpochSecond(), SECONDS);
                case OFFSET_SECONDS: {
                    ZoneOffset offset = ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue));
                    return create(dateTime.toInstant(offset), zone);
                }
            }
            return ofBest(dateTime.with(field, newValue), zone, offset);
        }
        return ChronoZonedDateTimeImpl.ensureValid(getChronology(), field.adjustInto(this, newValue));
    }
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)
334457
def is_known_scalar(value):
    
    def _is_datetime_or_timedelta(value):
        # Using pandas.Series helps catch python, numpy and pandas
        # versions of these types
        return pd.Series(value).dtype.kind in ('M', 'm')

    return not np.iterable(value) and (isinstance(value, numbers.Number) or
                                       _is_datetime_or_timedelta(value))
321617
def convert_to_database_compatible_value(value):
    
    if pd.isnull(value):
        return None
    if isinstance(value, pd.Timestamp):
        return value.to_pydatetime()
    try:
        return value.item()
    except AttributeError:
        return value
1259011
def _str_to_datetime(self, str_value):
        """"""
        try:
            ldt = [int(f) for f in str_value.split('-')]
            dt = datetime.datetime(*ldt)
        except (ValueError, TypeError):
            return None
        return dt
47946
def creation_time(self):
    """"""
    timestamp = self._fsapfs_file_entry.get_creation_time_as_integer()
    return dfdatetime_apfs_time.APFSTime(timestamp=timestamp)
976297
def set(self, instance, value, **kw):
        
        if value:
            try:
                value = DateTime(value)
            except SyntaxError:
                logger.warn("Value '{}' is not a valid DateTime string"
                            .format(value))
                return False

        self._set(instance, value, **kw)
780411
def value_as_datetime(self):
        ''' 

        '''
        if self.value is None:
            return None
        v1, v2 = self.value
        if isinstance(v1, numbers.Number):
            d1 = datetime.utcfromtimestamp(v1 / 1000)
        else:
            d1 = v1
        if isinstance(v2, numbers.Number):
            d2 = datetime.utcfromtimestamp(v2 / 1000)
        else:
            d2 = v2
        return d1, d2
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)
1242947
def datetime_handler(x):
    
    if isinstance(x, datetime.datetime) or isinstance(x, datetime.date):
        return x.isoformat()
    raise TypeError("Unknown type")