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:
root
2025-10-23 12:43:22 +00:00
parent 0d54243e9d
commit 9312586f18
5 changed files with 400 additions and 5 deletions

19
bitbylaw/check_db.py Normal file
View 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())