piwik_log_visit.visit_last_action_time one hour "late"


#1

I’m pretty new with pwik and after some 2 hours googling I gave up and I decided to ask here …

  1. web server, linux, timezone set to CET, time is set properly
  2. visitor (me, from another machine) have localtimezone set to CET and ltime set properly
  3. mysql server (linux) have localtimezone set to CET and time set properly
  4. mysql now() returns proper CET datetime value
  5. apache+php linux server where pwik is hosted (different from web server) also have localtime set as CET and time set properly
  6. phpinfo reports proper timezone for both “Default timezone” and “date.timezone”
  7. pwik configuration for “all” and for the “site” is that timezone is CET …

and now when I look at piwik_log_visit.visit_last_action_time and piwik_log_visit.visit_first_action_time they are wrong ?! they are one hour late … so instead of showing 2011-01-25 02:25:00 it show 2011-01-25 01:25:00 !!! … but the visitor_localtime field show proper datetime value (the local time from visitor)…

the “real time viewers” is showing proper times but I’m confused about times in database ?!

thx in advance


(vipsoft) #2
  1. Try changing Piwik configuration to not use CET. (These are noted as obsolete in PHP.) Pick something appropriate from: PHP: Europe - Manual

#3

Hi VipSoft,

I get the same error, I already chose Europe/Paris as Timezone on the website configuration but I still get the time with an hour late.
How can I disable the CET as you said ?
(I’m using Piwik 2.0.3)

Thanks


(Matthieu Aubry) #4

What error are you getting exactly?


#5

All the visits and the actions created by Piwik are an hour late.
For e.g, I began a new visit at 11:30 a.m and in MySQL, I can see my visit but it was started at 10:30 a.m.

I checked my web server and the Apache logs: the hour is correct.
I analyzed the request sent to Piwik from my website : the _refts and the _viewts parameters. They are already late there :S

On the configuration of my website on Piwik, I set the timezone to Europe/Paris but i can see that it still use the UTC time.

I’m using Piwik 2.0.3.


(Matthieu Aubry) #6

Piwik stores all data in UTC in the database. look at Visitors>Visitor log to see the time in your website timezone


#7

Piwik stores data in UTC Time in DataBase

check your website timezone by below:

website =>settings=>websites=>timezone
[attachment 1579 1.jpg]


#8

Ok, that explains everything. Thank you Matt.
So if I want to use the time outside MySQL database, I have to correct them.

Hurricane > I already set the correct timezone.