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

Create periods with timezones in a couple places that are missing it. #13445

Merged
merged 4 commits into from Oct 3, 2018

Conversation

diosmosis
Copy link
Member

No description provided.

@diosmosis diosmosis added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Sep 18, 2018
@diosmosis diosmosis added this to the 3.6.1 milestone Sep 18, 2018
@diosmosis
Copy link
Member Author

diosmosis commented Sep 18, 2018

@tsteur I'm wondering if my understanding of how matomo deals w/ timezones is correct. It's used sometimes when creating periods/dates, but not always.

EDIT: dealt with.

@tsteur
Copy link
Member

tsteur commented Oct 2, 2018

@diosmosis which issue fixes this here?


if (strpos($endDate, '-') === false) {
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to apply the timezone in one case but not the other?

I would have actually expected we wouldn't need to apply a timezone here at all... especially since it doesn't seem to be used for real time / raw data. Or is it applied in case there is today/yesterday? Actually I think I just answered the question :) a comment be good that the timezone might be only needed for today/yesterday basically.

For some reason I would not have expected the timezone eg in $last30Relative = new Range($period, $lastN, $timezone); Might be a bug.

Copy link
Member Author

Choose a reason for hiding this comment

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

lastN is based on today, so we'd need the timezone to figure out what 'today' is for the site?

Copy link
Member

Choose a reason for hiding this comment

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

I see... it is used when last parameter is not set 👍

@diosmosis
Copy link
Member Author

@tsteur fixes this issue: #13369 (comment)

@tsteur
Copy link
Member

tsteur commented Oct 2, 2018

LGTM if tests pass

@diosmosis
Copy link
Member Author

thanks for adding the comment, 👍

@diosmosis diosmosis merged commit ae872e5 into 3.x-dev Oct 3, 2018
@diosmosis diosmosis deleted the evolution-graph-timezone branch October 3, 2018 05:32
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…matomo-org#13445)

* Create periods with timezones in a couple places that are missing it.

* tweak

* Apply timezone only if endDate is not a normal date.

* add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants