"""Mixin that identifies a class as having a timestamp column"""
timestamp = Column(
- DateTime, default=datetime.datetime.utcnow, nullable=False
+ DateTime, default=datetime.datetime.now(datetime.UTC), nullable=False
)
entity = desc['entity']
query = query.filter(entity.deleted == False)
- update_context.values['timestamp'] = datetime.utcnow()
+ update_context.values['timestamp'] = datetime.datetime.now(datetime.UTC)
return query
The ``.values`` dictionary of the "update context" object can also
"""Mixin that identifies a class as having a timestamp column"""
timestamp = Column(
- DateTime, default=datetime.datetime.utcnow, nullable=False
+ DateTime, default=datetime.datetime.now(datetime.UTC), nullable=False
)
cls.HasTemporal = HasTemporal