Kunena 6.3.0 released

The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Announcement and "last time visited" timestamps are off

More
14 years 8 months ago - 14 years 8 months ago #1 by SweetGT
I noticed both of these are 4 hours later (in the future) than they really are.

I had to set my Kunena settings to be -4 to get the message timestamps correct.

The rest of my joomla pages/articles are pulling the correct time stamp according to the server time.

Where is this time stored and how/what file do we need to edit it to get it to the correct time?

Any ideas?

Thanks!
Last edit: 14 years 8 months ago by SweetGT.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #2 by xillibit

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #3 by SweetGT
That worked for the announcement timestamp.

What about for the "last visited date" and "registered date" under a person's profile?

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago - 14 years 8 months ago #4 by sozzled
This is a good question and one that has not been properly attended to since the days of Fireboard.

I spent about two hours this morning, struggling to make sense of how dates and times are displayed in Kunena.

On the one hand, the Kunena setting Board Offset = x (hours) seems to work fine for me w.r.t. displaying the timestamps on posted messages. No doubt, the information looks "right" for other users in my timezone (UTC +10 hours). On the other hand, though, the "board offset" time is ignored when it comes to displaying the announcement time, the registration date and the last visited date. Fiddling with the "board offset" time messes up the message posting times (so I leave the value = 0).

There are other instances where these dates are inconsistently displayed, too. (For example, if a person has registered but not visited the forum, the user list shows the last visited date as "Never" but the user profile shows the last visited date as 1-Jan-1970!)

What is lacking is the ability to convert the absolute MySQL date into a user's local time. In the case of showing the post times on the message boards, Kunena (and before it, Fireboard) used a "bandaid" method: i.e. show the post times relative to the current time (e.g. 5 hours, 46 minutes ago).

To convert these into an absolute date/time format (e.g 14-Aug-2009 12:00, roughly the time I'm writing this message) that's 12:00 pm according to Australian Eastern Standard Time. But that's 11:30 am Australian Central Time or 10:00 am Australian Western Standard Time and so on and so forth). What is needed is a consistent time display for all of Kunena's functions and these should be converted in an equivalent manner to using the Javascript getTimezoneOffset() function.

Perhaps this is something the developers will look into in a future version of Kunena. In the meantime I've learnt to accept the fact that many of the times I see are 10 hours "wrong" while many other times are correct. It's just one of those things. :(
Last edit: 14 years 8 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #5 by xillibit
Replied by xillibit on topic Re:Announcement and
SweetGT wrote:

That worked for the announcement timestamp.

What about for the "last visited date" and "registered date" under a person's profile?

Open the file components/com_kunena/template/default/plugin/fbprofile/summary.php and at line 43 replace this :
Code:
registerDate = strftime(_KUNENA_DT_DATETIME_FMT, strtotime($userinfo->registerDate)); $lastvisitDate = strftime(_KUNENA_DT_DATETIME_FMT, strtotime($userinfo->lastvisitDate));

by this :

Code:
registerDate = strftime(_KUNENA_DT_DATETIME_FMT, strtotime($userinfo->registerDate)+($fbConfig->board_ofset * 3600)); $lastvisitDate = strftime(_KUNENA_DT_DATETIME_FMT, strtotime($userinfo->lastvisitDate)+($fbConfig->board_ofset * 3600));

Open the file components/com_kunena/template/default/plugin/myprofile/myprofile_summary.php and at line 79 replace this :
Code:
echo $juserinfo->registerDate;

by this :
Code:
echo strftime(_KUNENA_DT_DATETIME_FMT,strtotime($juserinfo->registerDate)+($fbConfig->board_ofset * 3600));

and at line 83 replace this :
Code:
echo $juserinfo->lastvisitDate;

by this :
Code:
echo strftime(_KUNENA_DT_DATETIME_FMT,strtotime($juserinfo->lastvisitDate)+($fbConfig->board_ofset * 3600));

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #6 by sozzled
Thanks, xillibit. That's a great answer and it goes a long way to improving the consistency in the way Kunena displays timestamped information.

One of the basic problems, however, lies in the Board Offset setting. This setting allows the website manager the means of aligning the SQL server time to the webserver if the SQL server is located in elsewhere in a different timezone. However, this doesn't help the end user who is viewing absolute timestamps if they live in an different timezone to the webserver.

Let's look at my personal situation (see image below):


I'm guessing that the server for www.kunena.com is about 7 hours behind UTC. I know this because, if I edit a message (within a few minutes of posting it) it shows the time/date about 17 hours behind my local time.

This doesn't worry me, I'm used to working with webservers located all over the world, and it ought to be possible to use the PHP local_time() array to display times in a way that makes sense to users wherever they may live. Something for the developers to look at, perhaps? In the meantime, I can live with the "relative time" representation: e.g. Posted: xx hours, yy minutes ago. :)
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.511 seconds