Not Solved [How To?] How to change time
#1
Not Solved
How i can do this on mybb 18?

https://community.mybb.com/thread-42850.html

This post is old and i don't find code exemple:


$lastpost_date = my_date($mybb->settings['dateformat'], $lastpost_data['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $lastpost_data['lastpost']); 


I hope someone can help me.
Thanks
Reply
#2
Not Solved
$variable = my_date('relative', $another_variable);

?
Reply
#3
Not Solved
(2016-09-20, 09:31 PM)Sazze Wrote:
$variable = my_date('relative', $another_variable);

?

What i can do with this code?
Reply
#4
Not Solved
(2016-09-21, 08:04 AM)shihrem Wrote:
(2016-09-20, 09:31 PM)Sazze Wrote:
$variable = my_date('relative', $another_variable);

?

What i can do with this code?

Any code that uses the relative format in the my_date function will display as x time ago within a specific timeframe.

You can find the function within inc/functions.php on line 332 or here
[Image: TExMo15.png]


Reply
#5
Not Solved
So i need to change code from line 332 to this code?
I don't understand very well is my first time when i use mybb i'm a noob.
Thanks for replyes.
Reply
#6
Not Solved
As I said above, but here:

$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);

But I'm pretty sure MyBB already does this...
Reply
#7
Not Solved
(2016-09-21, 08:27 PM)Sazze Wrote: As I said above, but here:

$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);

But I'm pretty sure MyBB already does this...

Yes but i want to change time, my database is old and i want to change time from yar 2011 to 2016
last post 01.10.2011 to 01.10.2016 or somethng like this..
Hope now understand my request...
Reply
#8
Not Solved
(2016-09-21, 09:48 PM)shihrem Wrote:
(2016-09-21, 08:27 PM)Sazze Wrote: As I said above, but here:

$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);

But I'm pretty sure MyBB already does this...

Yes but i want to change time, my database is old and i want to change time from yar 2011 to 2016
last post 01.10.2011 to 01.10.2016 or somethng like this..
Hope now understand my request...

You want to update all posts/threads timestamp to a more current date?
[Image: TExMo15.png]


Reply
#9
Not Solved
(2016-09-22, 10:11 AM)Paradigm Wrote:
(2016-09-21, 09:48 PM)shihrem Wrote:
(2016-09-21, 08:27 PM)Sazze Wrote: As I said above, but here:

$lastpost_date = my_date('relative', $lastpost_data['lastpost']);
$lastpost_time = my_date('relative', $lastpost_data['lastpost']);

But I'm pretty sure MyBB already does this...

Yes but i want to change time, my database is old and i want to change time from yar 2011 to 2016
last post 01.10.2011 to 01.10.2016 or somethng like this..
Hope now understand my request...

You want to update all posts/threads timestamp to a more current date?

Yes this is what i want to do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)