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

Start and end date for Tags uses UTC time for all timezones #19526

Closed
Starker3 opened this issue Jul 13, 2022 · 1 comment
Closed

Start and end date for Tags uses UTC time for all timezones #19526

Starker3 opened this issue Jul 13, 2022 · 1 comment
Labels
invalid For issues or pull requests that are no longer relevant to Matomo core. Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced.

Comments

@Starker3
Copy link
Contributor

We had a user that was having issues when configuring a tag with a specific start date and end date.

While investigating this issue, I found that the Start and End time for a Tag that is stored in UTC will be treated as that time in any timezone and not be converted to that visitors timezone.

For example, if we create a Tag such as the following:
Thursday-14-07-2022 11-24-15
In the above example the start date is set as 1 AM July 14 NZST with end date 8 PM July 14 NZST
When this is converted to UTC, the start date is 1 PM July 13 UTC with end date 8 AM July 14 UTC

When we then test this tag in the browser, the tag does not fire with the following in the logs:
Thursday-14-07-2022 11-24-28
not firing as this tag does not match date
However, the time of my device when testing was 11:20 AM NZST or 11:20PM UTC

When I changed the End Date of the tag to one day further (8 PM July 15 NZST, 8 AM July 15 UTC), it fired correctly as it detected the End Date time had not occurred yet:

Thursday-14-07-2022 11-26-01

This indicates that the time for the start/end date is converted to UTC but is used in the browser as the local timezone of the browser.

@Starker3 Starker3 added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jul 13, 2022
@Starker3
Copy link
Contributor Author

Didn't realise I was still on the core repo.
Recreated in the Tag Manager repo.

@justinvelluppillai justinvelluppillai added the invalid For issues or pull requests that are no longer relevant to Matomo core. label Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid For issues or pull requests that are no longer relevant to Matomo core. Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced.
Projects
None yet
Development

No branches or pull requests

2 participants