Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crud.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime, timedelta, timezone
from datetime import UTC, datetime, timedelta

from lnbits.db import Database
from lnbits.helpers import urlsafe_short_hash
Expand All @@ -11,7 +11,7 @@
async def create_ticket(
payment_hash: str, wallet: str, event: str, name: str, email: str, extra: dict
) -> Ticket:
now = datetime.now(timezone.utc)
now = datetime.now(UTC)
ticket = Ticket(
id=payment_hash,
wallet=wallet,
Expand Down Expand Up @@ -74,7 +74,7 @@ async def purge_unpaid_tickets(event_id: str) -> None:

async def create_event(data: CreateEvent) -> Event:
event_id = urlsafe_short_hash()
event = Event(id=event_id, time=datetime.now(timezone.utc), **data.dict())
event = Event(id=event_id, time=datetime.now(UTC), **data.dict())
await db.insert("events.events", event)
return event

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "lnbits-events"
version = "0.0.0"
requires-python = ">=3.10,<3.13"
requires-python = ">=3.11,<3.13"
description = "LNbits, free and open-source Lightning wallet and accounts system."
authors = [{ name = "Alan Bits", email = "alan@lnbits.com" }]
urls = { Homepage = "https://lnbits.com", Repository = "https://github.com/lnbits/events" }
Expand Down
Loading
Loading