@jsoltani opened this Issue on November 17th 2018

Hi there,
Due to requiring some highly customized reports, we have to generate our reports directly from Matomo's database(a Maria DB instance). The thing is, in table matomo_log_link_visit_action server_time field is being written in UTC. And we need it to be in our time zone. To solve this issue, we have modified core/bootstrap.php and changed @date_default_timezone_set('UTC') to @date_default_timezone_set('Our time zone');. It corrects our generated reports but we have to do modification in website settings so that dashboard and other Matomo's application generated reports be correct either.
Is there any other way to do this?

Thanks

@tsteur commented on November 17th 2018 Member

Sorry there is no other way. Maybe you could leave it as UTC and apply instead some MySQL function to get correct date when you build your report.

@Mr-Norrell commented on December 1st 2018

@tsteur
As @jsoltani said, we have modified @date_default_timezone_set. Now in Vistors>Times we have the following:
image
As you may see, "hour (Start of visit) is "16"" which is correct. But the visit listed below it, is shown to be on 20:25:17 which is not correct. It must be 16:05:17. How can I correct this inconsistency?

@tsteur commented on December 1st 2018 Member

Where did you modify date_default_timezone_set @Mr-Norrell ?

@Mr-Norrell commented on December 2nd 2018

@tsteur
In core/bootstrap.php:35

@tsteur commented on December 2nd 2018 Member

cheers @Mr-Norrell I don't think we can do / will do anything here as it would require likely major changes in Matomo. I can only recommend to leave it at UTC as anything else is not supported, not tested, ... out of curiosity... how come you are setting a different timezone? Are you also accessing DB directly re raw data? If you, I suggest you apply a timezone directly in the mysql queries.

This Issue was closed on November 17th 2018
Powered by GitHub Issue Mirror