diff --git a/scripts/send_portal_message.py b/scripts/send_portal_message.py index e975de0..df4f969 100644 --- a/scripts/send_portal_message.py +++ b/scripts/send_portal_message.py @@ -51,8 +51,8 @@ def find_or_create_conversation(db, from_user_id, to_user_id): conv = Conversation( is_group=False, owner_id=from_user_id, - created_at=datetime.utcnow(), - updated_at=datetime.utcnow(), + created_at=datetime.now(), + updated_at=datetime.now(), ) db.add(conv) db.flush() @@ -61,13 +61,13 @@ def find_or_create_conversation(db, from_user_id, to_user_id): conversation_id=conv.id, user_id=from_user_id, role='owner', - joined_at=datetime.utcnow(), + joined_at=datetime.now(), )) db.add(ConversationMember( conversation_id=conv.id, user_id=to_user_id, role='member', - joined_at=datetime.utcnow(), + joined_at=datetime.now(), )) db.flush() @@ -81,7 +81,7 @@ def send_message(db, conv, sender_id, content): conversation_id=conv.id, sender_id=sender_id, content=content, - created_at=datetime.utcnow(), + created_at=datetime.now(), ) db.add(msg) db.flush()