diff --git a/sqlalchemy_utils/models.py b/sqlalchemy_utils/models.py index 81fa4541..66529fa0 100644 --- a/sqlalchemy_utils/models.py +++ b/sqlalchemy_utils/models.py @@ -22,8 +22,8 @@ class SomeModel(Base, Timestamp): id = sa.Column(sa.Integer, primary_key=True) """ - created = sa.Column(sa.DateTime, default=datetime.now(timezone.utc), nullable=False) - updated = sa.Column(sa.DateTime, default=datetime.now(timezone.utc), nullable=False) + created = sa.Column(sa.DateTime(timezone=True), default=datetime.now(timezone.utc), nullable=False) + updated = sa.Column(sa.DateTime(timezone=True), default=datetime.now(timezone.utc), nullable=False) @sa.event.listens_for(Timestamp, 'before_update', propagate=True)