Thread Starter
royzzz
(@royzzz)
DB:
id user_id act_type act_date act_params
2 1 CONNECT 8252-07-11 13:10:38
3 8 CONNECT 8255-07-11 13:10:38
Plugin Author
Dric
(@dric1107)
I think the time() function shows strange results with your hosting.
time : 11 July 2011 14 h 27 mi
But this could has been wrong too, it also uses time() !
I updated once again wp-activity for more debug infos. Could you try it again ?
You should see the results of time function and mysql2date function.
Thread Starter
royzzz
(@royzzz)
I updates, this looks so strange:
http://www.roypoots.nl/member-activity/
So the DB says:
id user_id act_type act_date act_params
1 1 CONNECT 0556-07-11 13:10:39
but the output doesnt match anymore:
oy has logged.time function : 1310391181 mysqldate : 1181-07-11 13:10:39 - time : 11 July 2011 15 h 33 mi - in_seconds : 11 July 0556 13 h 10 mi = diff : 19723046400 - gmt_option : 2
0556/07/11 13:10:39
When i try:
$act_time=date(‘Y-m-d H:i:s’);
and DB:
2 1 CONNECT 2011-07-11 13:42:12
3 8 CONNECT 2011-07-11 13:42:43
the actual date is in the DB, but not my GMT time.. but getting close!
Plugin Author
Dric
(@dric1107)
I think I got it !
I was using mysql2date function, and when carefully reading the WP codex it says that the input shouldn’t be the raw timestamp. And that’s exactly the mistake I done… 😐
The most strange is that it should have bugged in all hostings…
I updated (for the last time I hope) wp-activity.php. I changed mysql2date() by date(), and it could solve you problem.
Thread Starter
royzzz
(@royzzz)
WOW 🙂 that would be awesome. will be updating by now
/edit: gives me:
Date User Event Type
1 1963/07/11 13:10:39 Roy CONNECT
$act_time=date(‘Y-m-d H:i:s’); works for me, but i should take a look at the GMT, maybe that helps? 🙂
Plugin Author
Dric
(@dric1107)
Yes, I discovered just after updating that the dates are now stored in UTC.
I made changes to my script, it will store dates in UTc format, and displays it in GMT format, according to the WP settings.
Please test the last updated wp-activity.php !
Thread Starter
royzzz
(@royzzz)
Woohooo you did it 🙂
1 2011/07/11 16:39:14 Roy CONNECT
You are AWESOME!
1 2011/07/11 16:39:54 Roy CONNECT
2 2011/07/11 16:39:14 Roy CONNECT
Does indeed show the last one! So the double activity is also solved!