Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms date formatting #425

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Forms date formatting #425

merged 2 commits into from
Oct 16, 2023

Conversation

martinhpedersen
Copy link
Member

I discovered an error in the time formatting strings we use in the forms package, so I wanted to write some tests and fix this.

As it turns out, the error did not affect the outputted strings. It only manifests when outputting datetime strings not in UTC, which none of these does. Anyway, I've added some tests and fixed the layout strings 🙂

The reference date is MST (seven hours west of GMT). This is a very
common mistake when constructing formatting strings to be used with
time.Format.

Since we converted all dates that includes zone information to UTC
*before* outputting in Z time, this bug did not affect the output
strings. But it's best to use the correct reference time anyway, in case
we later add a string representation including zone information that is
not UTC.
@martinhpedersen martinhpedersen added this to the v0.15.1 milestone Oct 15, 2023
Copy link
Contributor

@xylo04 xylo04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting bug, and nice fix! :)

@martinhpedersen martinhpedersen merged commit 0f183d0 into develop Oct 16, 2023
8 checks passed
@martinhpedersen martinhpedersen deleted the forms-date-formatting branch October 16, 2023 13:55
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.

2 participants