Good evening all.
For a while now (a few updates?) my boards timestamps have been weird/wrong.
I am on 1.8.14 currently, but will update to .15 asap. I don't think it's a .14 issue though.
My timestamps, for anything more than 24 hours, appear as: ", 12:04 pm"
Older than that and the date shows as it is supposed to.
Can anyone point out what needs fixing to make the timestamp work right?
Thanks!
Sam
ACP > Configuration > Date and Time Formats
Do your settings look like this?
Yup, the very same.
To show you how the forum looks:
[
attachment=40089]
You can see older timestamps work as do really recent ones, but those in the middle don't.
Edit: Read below for the fix.
That's a bug, you can fix it by change the code in functions.php
else
{
if($ty && $format == $mybb->settings['dateformat'])
{
if($todaysdate == $date)
{
- $date = $lang->sprintf($lang->today, $real_date);
+ $date = $lang->today;
}
else if($yesterdaysdate == $date)
{
- $date = $lang->sprintf($lang->yesterday, $real_date);
+ $date = $lang->yesterday;
}
}
I've checked and that part of functions.php is exactly as written above.
Try this:
1. Copy the my_date function from inc/functions.php from a 1.8.15 download to your /inc/functions.php (basically overwrite the old function).
2. Upload the 1.8.15 language files.
(2018-03-23, 11:40 PM)Bifford Wrote: [ -> ]I've checked and that part of functions.php is exactly as written above.
see once again in my post here
https://community.mybb.com/thread-216528...pid1299982
there is a sign "-" and "+"
- $date = $lang->sprintf($lang->today, $real_date);
+ $date = $lang->today;
that mean, sign "-" you have to delete that line and add "+"
don't forget to remove that sign
I updated files from 1.8.15 and now I have same issue. How ironic.
EDIT: Actually the changes are in 2 locations. Really not sure why because I used the Changed Files package my_date function for 1.8.15. I have to double check to make sure they didn't screw up the upgrade package with the wrong file.
I had only found the one place initially, which was already correct. I now have found and altered the other two places also.
It now works!
Thanks everyone for the help!