Union[datetime.datetime, None]: Datetime at which the dataset was
        last modified (:data:`None` until set from the server).
777355
def modified(self):
        
        modified_time = self._properties.get("lastModifiedTime")
        if modified_time is not None:
            # modified_time will be in milliseconds.
            return google.cloud._helpers._datetime_from_microseconds(
                1000.0 * float(modified_time)
            )
192539
def datetime2ole(dt):
    """"""
    delta = dt - OLE_TIME_ZERO
    delta_float = delta / datetime.timedelta(days=1)  # trick from SO
    return delta_float
354786
def datetime(anon, obj, field, val):
    
    return anon.faker.datetime(field=field)
1026463
def to_datetime(data):
    
    my_date_time = None

    if 'published_parsed' in data:
        my_date_time = datetime.datetime.utcfromtimestamp(time.mktime(data.get('published_parsed')))
    elif 'created_parsed' in data:
        my_date_time = datetime.datetime.utcfromtimestamp(time.mktime(data.get('created_parsed')))
    elif 'updated_parsed' in data:
        my_date_time = datetime.datetime.utcfromtimestamp(time.mktime(data.get('updated_parsed')))
    elif 'my_date' in data:
        my_date_time = arrow.get(data['my_date'])

    return my_date_time
386642
def date_in_past(self):
        
        now = datetime.datetime.now()
        return (now.date() > self.date)
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
107411
def time_range(from_=None, to=None):  # todo datetime conversion
    
    args = locals()
    return {
        k.replace('_', ''): v for k, v in args.items()
    }
534326
def before_start(self, when=None):
        
        if when is None:
            when = datetime.now()

        return self._val[0] > when
185417
def start_date(self) -> Optional[datetime.date]:
        
        if not self.intervals:
            return None
        return self.start_datetime().date()
958171
def last_login_date(self):
        
        return sa.Column(
            sa.TIMESTAMP(timezone=False),
            default=lambda x: datetime.utcnow(),
            server_default=sa.func.now(),
        )
754157
def now(cls, Name = None):
		
		self = cls()
		if Name is not None:
			self.Name = Name
		self.pcdata = datetime.datetime.utcnow()
		return self
1338797
def last_written_time(self):
    """"""
    if self._last_written_time is None:
      return dfdatetime_semantic_time.SemanticTime('Not set')

    return dfdatetime_filetime.Filetime(timestamp=self._last_written_time)
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
1095943
def timesince_or_never(dt, default=None):
    
    if default is None:
        default = _("Never")

    if isinstance(dt, datetime.date):
        return timesince(dt)
    else:
        return default
312855
def datetime_from_timestamp(n, epoch=datetime.datetime.fromordinal(693594)):
    
    return epoch + datetime.timedelta(n)
186066
def date(self) -> Optional[DateHeader]:
        """"""
        try:
            return cast(DateHeader, self[b'date'][0])
        except (KeyError, IndexError):
            return None
1088772
def _past_datetime_from(self):
        
        prevDt = self.__localBefore(timezone.localtime(), dt.time.max,
                                    excludeCancellations=True,
                                    excludeExtraInfo=True)
        return prevDt