feat(backend): presence stats count time online from sessions in the browser time zone, capture uptime marks hours without data, presence reaches every stream of the account, message volume keeps empty days
This commit is contained in:
1 parent
bb38e23f29
commit
f44597b2dc
14 files changed
+585
-26
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import asyncpg
|
||||
from fastapi import HTTPException
|
||||
|
||||
from utils.read.period import known_timezone
|
||||
|
||||
|
||||
async def checked_tz(pool: asyncpg.Pool, tz: str) -> str:
|
||||
if not await known_timezone(pool, tz):
|
||||
raise HTTPException(status_code=422, detail=f"Unknown time zone: {tz}")
|
||||
return tz
|
||||
Reference in new issue
Block a user