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

Set the user timezone before comparing data #2011

Merged
merged 1 commit into from Jul 12, 2016

Conversation

escopecz
Copy link
Sponsor Member

Please answer the following questions:

Q A
Bug fix? Y
New feature? N
BC breaks? N
Deprecations? N
Fixed issues /

Description

The line charts data displays data moved by day or several hours depending on the Mautic timezone settings. The issue was in comparing the date range dates in user's timezone with date of the count in UTC. The database date was correctly initiated with UTC timezone, but not converted to user's timezone which made the difference.

Steps to reproduce the bug (if applicable)

  1. Make sure you have your timezone configured correctly and if you are in UTC timezone, it will work for you, so configure for example New York and pretend that you are there, move your clock -4 hours (or at least pretend that they show the New York time).
  2. Put the "Contacts created in time" widget to the top of your dashboard and check what is the value today. Remember this number.
  3. Add one more contact.
  4. Go back to dashboard and check if the number you have in your head is raised +1. It probably isn't but yesterday's is probably.

Steps to test this PR

  1. Apply this PR and refresh the dashboard. You should see the number move from yesterday to today and so it should contain the correct data in the day view.
  2. Let's move to the hourly view. Filter the dashboard to display only the today. The line charts should zoom in and display the data per hour. The right data in the right hour.
  3. The right data should be displayed in all views (hour, day, week, month, year)

@escopecz escopecz added T1 Low difficulty to fix (issue) or test (PR) bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Jul 11, 2016
@escopecz escopecz added this to the 2.0.1 milestone Jul 11, 2016
@npracht
Copy link
Member

npracht commented Jul 11, 2016

Hi @escopecz,

Is there any chance that it's related to #1878 ?

N.

@dbhurley
Copy link
Member

+1

@escopecz
Copy link
Sponsor Member Author

@npracht might be. Could you give it a test? It's just one line change.

@alanhartless
Copy link
Contributor

+1

@alanhartless alanhartless merged commit a5c2aef into mautic:staging Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test T1 Low difficulty to fix (issue) or test (PR)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants