Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released

The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.

Topics must relate to a currently supported version of Kunena. If you are unsure what is the current supported version of Kunena, please go to the download page.

If you are having problems then, for your own benefit, it would save us all a lot of time if you would kindly post your configuration report when you ask for help from this forum. If you do not post your configuration report we will not ask you for it but you will probably not get your problem solved, either.

Idea Timezone issues

More
4 weeks 2 days ago - 4 weeks 2 days ago #235486 by neo314
Replied by neo314 on topic Timezone issues
I see the issue. The timezone is correct. Not reading it this way often, I did not realize that it was reporting the time zone because instead of saying PDT, Pacific Standard, or America/LosAngeles, it says: "Time Zone: UTC -7:00". After I corrected the time zone, I did not recognize that the problem was corrected in the Most people don't read time zones by offset.

I used a template override.


<li class="list-group-item">
<strong><?php echo Text::_('COM_KUNENA_MYPROFILE_TIMEZONE'); ?>:</strong>
<?php /* MOD Show Timezone, not just offset
<span><?php echo $this->profile->getTime()->toTimezone(); ?></span>
Modified to add timezone name/abbreviation
This code would display name like America/Los Angeles
<span><?php echo $this->profile->getTime()->getTimezone()->getName(); ?></span>
*/
?>
<span><?php echo $this->profile->getTime()->format('T', true); ?></span>
</li>


I am thinking it would be good to add a user preference for time zone display format. I am not sure if the offset from toTimezone is used for calculation within the forum, but for display, an optional parameter in the function could offer different returns for display.

Something like: 

/**
* @param string $mode 'offset' (e.g. -7:00), 'abbr' (e.g. PDT) or 'name' (e.g. America/Los_Angeles)
*
* @return string
*
* @since Kunena 6.0
*/
public function toTimezone(string $mode = 'offset'): string
{
switch ($mode) {
case 'abbr':
return $this->format('T', true);

case 'name':
return $this->getTimezone()->getName();

default:
$timezone = $this->getOffsetFromGMT(true);

return sprintf('%+d:%02d', $timezone, ($timezone * 60) % 60);
}
}


Then a configuration parameter can be sent to the function to return the display preference.
Last edit: 4 weeks 2 days ago by neo314.

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

More
4 weeks 2 days ago - 4 weeks 2 days ago #235487 by Pinkeltje
Replied by Pinkeltje on topic Timezone issues
Glad it’s sorted. A template override is exactly the right tool for a display preference like this. Note that format ('T') returns an offset like +04 for many timezones that have no common abbreviation, so it isn’t a universal improvement over the offset either.
Last edit: 4 weeks 2 days ago by Pinkeltje.

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

Time to create page: 0.303 seconds