fix(scripts): use datetime.now() instead of utcnow() to match server timezone
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2613b3fa05
commit
89d105b768
@ -51,8 +51,8 @@ def find_or_create_conversation(db, from_user_id, to_user_id):
|
|||||||
conv = Conversation(
|
conv = Conversation(
|
||||||
is_group=False,
|
is_group=False,
|
||||||
owner_id=from_user_id,
|
owner_id=from_user_id,
|
||||||
created_at=datetime.utcnow(),
|
created_at=datetime.now(),
|
||||||
updated_at=datetime.utcnow(),
|
updated_at=datetime.now(),
|
||||||
)
|
)
|
||||||
db.add(conv)
|
db.add(conv)
|
||||||
db.flush()
|
db.flush()
|
||||||
@ -61,13 +61,13 @@ def find_or_create_conversation(db, from_user_id, to_user_id):
|
|||||||
conversation_id=conv.id,
|
conversation_id=conv.id,
|
||||||
user_id=from_user_id,
|
user_id=from_user_id,
|
||||||
role='owner',
|
role='owner',
|
||||||
joined_at=datetime.utcnow(),
|
joined_at=datetime.now(),
|
||||||
))
|
))
|
||||||
db.add(ConversationMember(
|
db.add(ConversationMember(
|
||||||
conversation_id=conv.id,
|
conversation_id=conv.id,
|
||||||
user_id=to_user_id,
|
user_id=to_user_id,
|
||||||
role='member',
|
role='member',
|
||||||
joined_at=datetime.utcnow(),
|
joined_at=datetime.now(),
|
||||||
))
|
))
|
||||||
db.flush()
|
db.flush()
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ def send_message(db, conv, sender_id, content):
|
|||||||
conversation_id=conv.id,
|
conversation_id=conv.id,
|
||||||
sender_id=sender_id,
|
sender_id=sender_id,
|
||||||
content=content,
|
content=content,
|
||||||
created_at=datetime.utcnow(),
|
created_at=datetime.now(),
|
||||||
)
|
)
|
||||||
db.add(msg)
|
db.add(msg)
|
||||||
db.flush()
|
db.flush()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user