Skip to content

fix: timezone offset aware datetime mixin#88

Merged
Besthope-Official merged 2 commits into
mainfrom
fix/offset-aware-datetime-mixin
Jan 9, 2026
Merged

fix: timezone offset aware datetime mixin#88
Besthope-Official merged 2 commits into
mainfrom
fix/offset-aware-datetime-mixin

Conversation

@Besthope-Official
Copy link
Copy Markdown
Contributor

Summary of Changes

use DateTime field and a timezone factory function

Breaking Changes

add a timezone setting config

Checklist

  • Issue discussion completed before opening PR
  • Scope is small and focused (single feature/fix)
  • All functions have full type annotations
  • Async/await used for all I/O operations
  • Tests added for new behaviors

@Besthope-Official Besthope-Official added the Backend-enhanced backend enhancement label Jan 9, 2026
@Besthope-Official Besthope-Official merged commit 65b41af into main Jan 9, 2026
3 checks passed
@Besthope-Official Besthope-Official deleted the fix/offset-aware-datetime-mixin branch January 9, 2026 15:14
@Besthope-Official
Copy link
Copy Markdown
Contributor Author

Besthope-Official commented Feb 4, 2026

Storing timezone-offset timestamps in the database breaks datetime comparisons across different offsets and violates standard practice.

Action needed:

  1. Revert TimestampMixin to store UTC only
  2. Move timezone conversion to presentation layer (see Add timezone conversion in API serialization layer #124 )

The settings.app.timezone config may still be useful for serialization but should not affect storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend-enhanced backend enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant