Files
motia/bitbylaw/check_db.py
root 9312586f18 Fix Advoware timestamp parsing bug causing sync loops
- Change .replace(tzinfo=BERLIN_TZ) to BERLIN_TZ.localize() for correct pytz TZ handling
- Update Phase 4 to use proper TZ localization for adv_ts
- Add documentation section on correct Advoware timestamp handling
- Add .gitignore, GOOGLE_SETUP_README.md, and check_db.py utility
2025-10-23 12:43:22 +00:00

19 lines
568 B
Python

import asyncio
import asyncpg
from config import Config
async def check_db():
conn = await asyncpg.connect(
host=Config.POSTGRES_HOST or 'localhost',
user=Config.POSTGRES_USER,
password=Config.POSTGRES_PASSWORD,
database=Config.POSTGRES_DB_NAME,
timeout=10
)
try:
row = await conn.fetchrow('SELECT * FROM calendar_sync WHERE sync_id = $1', '1329fa1f-9de5-49dc-95c6-a13525f315c5')
print('DB Row:', dict(row) if row else 'No row found')
finally:
await conn.close()
asyncio.run(check_db())