Skip to content

Add a tz parameter to DateTimeLocalField - #905

Merged
azmeuk merged 1 commit into
pallets-eco:mainfrom
azmeuk:833-datetime-tz
May 6, 2026
Merged

azmeuk merged 1 commit into
pallets-eco:mainfrom
azmeuk:833-datetime-tz

Conversation

@azmeuk

@azmeuk azmeuk commented May 6, 2026

Copy link
Copy Markdown
Member

DateTimeLocalField takes an optional tz parameter that can be a ZoneInfo or a callable returning a ZoneInfo.

It is useful to display dates in the end user timezone when they are stored in another timezone on the server, and it adds the tz information to the user input so server can convert it back easily.

Fix #833

@azmeuk azmeuk added the enhancement New feature, or existing feature improvement label May 6, 2026
@azmeuk
azmeuk force-pushed the 833-datetime-tz branch from a9278a4 to 970978b Compare May 6, 2026 22:48
@azmeuk
azmeuk merged commit 4d60f8e into pallets-eco:main May 6, 2026
17 checks passed
@azmeuk
azmeuk deleted the 833-datetime-tz branch May 6, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, or existing feature improvement

Development

Successfully merging this pull request may close these issues.

Add timezone management to DateTimeLocalField

1 participant