Solved: 3 Years, 7 Months, 3 Weeks ago $mybb->settings['dateformat'] NOT working properly.
#7
Solved: 3 Years, 7 Months, 3 Weeks ago
(2018-02-22, 01:51 AM)Omar G. Wrote: I believe the return date is stored in like "{$return_day}-{$return_month}-{$return_year}", so you need to explode it and convert it to a timestamp as already explained.

MyBB doesn't store the seconds, minutes, nor hours for this feature.

I'm not too worried about seconds, minutes and hours on this part. Just more interested in getting the awaydate to look like the rest of the site formatting for date.

As far as "you need to explode it and convert it to a timestamp" I do not know how to do such and would really appreciate if someone could walk me through step by step. PHP is new to me and I don't understand much of it. Just enough to make a few simple pages necessary other than that I have no clue what I'm doing lol.

THIS HAS BEEN SOLVED BY DOYLECC:
---
If anyone else is having the issue the simple fix is this,
$returndate = my_date($mybb->settings['dateformat'], strtotime($users['returndate']));

However, if the user had an "unknown" return date it says return "Today". I use template conditionals so to fix this I just did
<if $returndate == "Today" then>Unknown<else then><else />{$returndate}</if>
> SELECT finger FROM hand WHERE id='3'
Reply


Messages In This Thread
RE: $mybb->settings['dateformat'] NOT working properly. - by isoldehn - 2018-02-22, 05:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)