MyBB Community Forums

Full Version: relative time vs. absolute time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a setting that selects relative time format or absolute time format?
Whether adminCP or userCP?

Or is it baked in for relative within 24 hours and absolute after that?

Needs a plugin?
Downloaded, installed and working perfectly.
Thank you.
If you decide to do a simple switch without a plugin (recommended), then search for this line in ~/inc/functions.php:
function my_date($format, $stamp=0, $offset="", $ty=1, $adodb=false)
...and change it to this:
function my_date($format, $stamp=0, $offset="", $ty=2, $adodb=false)
As you can tell, $ty=1 was switched to $ty=2, hence forcing the absolute time function without a plugin.
(2018-07-19, 08:13 AM)rfssjz Wrote: [ -> ]As you can tell, $ty=1 was switched to $ty=2, hence forcing the absolute time function without a plugin.

Would it be possible to make this change adjustable for the user himself, e.g. via the User-CP? And if so, how?
Yes. With the plugin referenced earlier. Still using it. I despise relative time, others like it, so the plugin lets the forum members make the choice.
Thank you! I also got it working now. Very nice!

The problem was that the link to https://doylecc.altervista.org/en/time.html was answered with an "ERR_TOO_MANY_REDIRECTS" on the Chrome browser. I now tried it with another browser and there it works.

redirect-checker.org says:

Result
https://doylecc.altervista.org/en/time.html
301 Moved Permanently
http://doylecc.altervista.org/en/time.html
200 OK
../bb/downloads.php?dlid=8&cat=1
Meta Refresh

Problems found:
Meta Refresh.

I guess there is actually a problem with the page that some browsers ignore and others don't. Redirecting from https to http is not really a good idea either.