Skip to content

Comments

[6.x] Time field enhancements#13799

Merged
jackmcdade merged 3 commits into6.xfrom
time-field
Feb 3, 2026
Merged

[6.x] Time field enhancements#13799
jackmcdade merged 3 commits into6.xfrom
time-field

Conversation

@jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Feb 2, 2026

This PR adds:

  • An augment_format option to the time fieldtype.
    This will allow you to use {{ time_field }} by itself on the frontend and it will output the appropriate format with needing any modifiers.

  • A format_time modifier
    This can be chained into a time and will convert it to the given format.
    It bypasses any of the timezone logic that the other date modifiers use.
    e.g. {{ "13:45" | format_time('g:ia') }} outputs 1:45pm
    It will use g:ia by default so you don't even need to pass the format.
    e.g. {{ "13:45" | format_time }} outputs 1:45 too.

Closes #13766

@jackmcdade jackmcdade merged commit 7477ee4 into 6.x Feb 3, 2026
11 checks passed
@jackmcdade
Copy link
Member

Works great!

@jackmcdade jackmcdade deleted the time-field branch February 3, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Time fieldtype gets wrong timezone in template

2 participants