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
This commit is contained in:
19
bitbylaw/check_db.py
Normal file
19
bitbylaw/check_db.py
Normal file
@@ -0,0 +1,19 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user