fix(auth): compare session expiry against UTC now
created_at is stored in UTC, but expiry was checked against naive
local datetime.now(). On UTC+8 servers (Singapore, Shanghai) users
were logged out ~8 hours early.
Closes #214
The diff doesn't show any import changes, so check two things before you commit:
session.pyneedstimezoneimported fromdatetime.- The test file needs
timeandtimezoneimported.
created_at also has to be timezone-aware. If it's ever stored as a naive datetime, comparing it with datetime.now(timezone.utc) will raise a TypeError.
Real run recorded with claude-code / claude-opus-5-5. Output is shown verbatim, unmodified.
Qué hace
Escribe un mensaje de commit para tu cambio en formato Conventional Commits: <type>(<scope>): <imperative summary>, idealmente de 50 caracteres o menos y nunca de más de 72.
Cómo funciona
- Se activa con «write a commit», «commit message», /commit o /caveman-commit.
- Añade un cuerpo solo cuando el motivo no es obvio y siempre para cambios incompatibles, correcciones de seguridad, migraciones de datos y reversiones.
- Omite «this commit does…», los emojis y las líneas de atribución de IA, a menos que tus propias reglas exijan un trailer de atribución.
Ideal para
Mantener el historial de git breve, coherente y útil para la próxima persona que depure.
Conviene saber
Muestra el mensaje como un bloque de código y se detiene. No añade archivos al staging, no hace commit ni amend.
Solo contiene instrucciones: sin scripts, sin acceso a la red y sin escritura de archivos. El paquete también contiene README, LICENSE y NOTICE del repositorio original. Nunca ejecuta comandos de git.