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
Conversation
@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. |
@diosmosis which issue fixes this here? |
|
||
if (strpos($endDate, '-') === false) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 👍
@tsteur fixes this issue: #13369 (comment) |
LGTM if tests pass |
thanks for adding the comment, 👍 |
…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
No description provided.