Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use UTC for future release date#926

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

smortex
Copy link
Contributor

When using future releases, the current local date is writen in the
generated CHANGELOG. This is usualy done as part of releasing a new
version, that is a few seconds before a that version is tagged and
that tag is pushed to GitHub.

On next version bump, that previous tag exist and it's date is read from
GitHub which provide this information in Coordinated Universal Time
(UTC).

Depending on the time-zone of the user, the date of these two Ruby Time
objects may be different, leading to an unexpected change in the
previous entry of the CHANGELOG.

To avoid this, convert the local time to UTC when we do not have an
actual tag time to use.

@smortexsmortexforce-pushed theutc-date-for-future-release branch from9b617c2 to1139c1bCompareDecember 28, 2020 19:28
Copy link
Collaborator

@olleolleolleolleolleolle left a comment

Choose a reason for hiding this comment

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

Thanks a lot, this looks like a quality of life change!

end

it { is_expected.to eq(["2.0.0", "2.0.0", Time.gm(2020, 12, 28, 3)]) }
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding a spec, this helps catch regressions. But, perhaps a code comment, or an "it" being described with a note that captures the essence of the change (should always use UTC since GitHub uses UTC for the things we care about, etc).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

lol, I was focusing what was being tested and the reason for this has been completely lost!

I amended my commit to add a context and an explicit comment. Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks perfect, and will guide the interested reader in the future.

Thanks,@smortex for the repairs!

@smortexsmortexforce-pushed theutc-date-for-future-release branch from1139c1b to0ed7f4cCompareDecember 29, 2020 07:46
When using future releases, the current local date is writen in thegenerated CHANGELOG.  This is usualy done as part of releasing a newversion, that is a few seconds before a that version is tagged andthat tag is pushed to GitHub.On next version bump, that previous tag exist and it's date is read fromGitHub which provide this information in Coordinated Universal Time(UTC).Depending on the time-zone of the user, the date of these two Ruby Timeobjects may be different, leading to an unexpected change in theprevious entry of the CHANGELOG.To avoid this, convert the local time to UTC when we do not have anactual tag time to use.
@smortexsmortexforce-pushed theutc-date-for-future-release branch from0ed7f4c to2a44a8fCompareDecember 29, 2020 07:48
Copy link
Collaborator

@olleolleolleolleolleolle left a comment

Choose a reason for hiding this comment

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

LGTM!

end

it { is_expected.to eq(["2.0.0", "2.0.0", Time.gm(2020, 12, 28, 3)]) }
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks perfect, and will guide the interested reader in the future.

Thanks,@smortex for the repairs!

@olleolleolleolleolleolle merged commit838655b intogithub-changelog-generator:masterDec 29, 2020
@smortexsmortex deleted the utc-date-for-future-release branchDecember 29, 2020 07:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@olleolleolleolleolleolleolleolleolle approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@smortex@olleolleolle

[8]ページ先頭

©2009-2025 Movatter.jp