-
Notifications
You must be signed in to change notification settings - Fork 798
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
CRM: Fix dashboard contact graph #38316
base: trunk
Are you sure you want to change the base?
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. |
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.
Nice, thanks for working on this.
What would be the best way to change the timezone? In my case I created a contact and set the creation date for June 30th UTC+0, evening. Changed my timezone in WordPress to UTC+13 which changed the contact creation date to July 1st. The dashboard graph still shows the contact entry for June, both with and without the PR.
That's a great question. That should've bugged the dashboard's graph. Adjust inside your database |
Yes that's how I adjusted the |
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.
To test this way:
We could use the WP installation timezone configured:
$datetime_month = new DateTime( '@', $v->ts );
$datetime_month->setTimezone( new DateTimeZone('the_UTC_time_zone') );
$the_month = $datetime_month->format( 'M y' );
Fixes https://github.com/Automattic/zero-bs-crm/issues/3468
Proposed changes:
Other information:
Jetpack product discussion
https://github.com/Automattic/zero-bs-crm/issues/3468
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
Alternatively just test the new code and check if the behavior is consistently the same as the previous, and that the new code looks good enough.