Skip to content

Render the time bounds with getutc so the caller's Time is left alone - #1314

Open
Thayorns wants to merge 1 commit into
zerocracy:masterfrom
Thayorns:1231
Open

Thayorns wants to merge 1 commit into
zerocracy:masterfrom
Thayorns:1231

Conversation

@Thayorns

Copy link
Copy Markdown
Contributor

Fbe::Graph rendered the time bounds of pull_requests_with_reviews, total_commits_pushed and total_issues_created with since.utc.iso8601. Time#utc converts the receiver itself, so these methods changed the caller's Time to UTC and raised FrozenError on a frozen one, as #1231 shows.

Now all four spots use getutc, which returns a new Time and leaves the argument alone. The query text is the same as before.

The tests stub query and check that a since or till with a random offset keeps it after the call, that a frozen Time is accepted by each of the three methods, and that the search window is still rendered in UTC.

Closes #1231

@Thayorns

Copy link
Copy Markdown
Contributor Author

@yegor256 take a look please, happy to clarify anything about this change.

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.

Fbe::Graph converts the caller's since and till to UTC in place, and raises FrozenError on a frozen Time

1 participant