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

Fix git commit date string formatting #1181

Merged
merged 1 commit into from
Mar 15, 2023
Merged

Fix git commit date string formatting #1181

merged 1 commit into from
Mar 15, 2023

Conversation

fearnoeval
Copy link
Contributor

I noticed that the Git dates are formatted with two timezones due to the way time.Time.String() is implemented. This change outputs the date in a similar, almost-RFC3339 format, but with the timezone only appearing once.

The way that Go's date formatting works makes me a bit uncomfortable, but it must work well enough given that all of the built-in date formats use it, so I followed the same pattern. The date used in the implementation is the one used by Go's time.RFC3339 since the string being output is similar.

Example

// Before
2023-03-08 15:55:42 -0500 -0500

// After
2023-03-08 15:55:42 -0500

Resources

@fearnoeval fearnoeval requested a review from a team as a code owner March 14, 2023 21:29
@CLAassistant
Copy link

CLAassistant commented Mar 14, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@mcastorina mcastorina left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, this looks good to me and would close #1047

Could you also update ScanStaged with the same logic?

@fearnoeval
Copy link
Contributor Author

My mistake; the change is made in ScanStaged now as well.

Copy link
Collaborator

@mcastorina mcastorina left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

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

Successfully merging this pull request may close these issues.

3 participants