MyBB Community Forums

Full Version: [Help] Ajax Chat Date & Time wrong
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys, i installed
http://mods.mybb.com/view/ajax-chat
in our forum.

The problem now is the date and the time.

In this plugin it will show us

1.7.14 8:29

but in my country it is:

7.1.14 14:29.

This means the time is 6 hours back than mine and the date is MMBig GrinD but i need DD:MM.

Where can i change these things? I havenĀ“t find it under templates and haven t find it in the .php maybe somebody could help me.

greetz
open ./chat_frame.php file in a code editor (eg. notepad++) - around line 23 find code line like below
$date = date('n/j/y G:i', $row["date"]);

you can change it to
$date = date('j/n/y G:i', $row["date"]);
see more details about php date format if required
Ty this works, but i also have the problem that the time is 6 hours back of my country
^ can we know your time zone - what is the difference between your local time and UTC (GMT)
My time is GMT +1 (20:04 atm)
on the chatbox its at the moment 14:04
^ can you add below code line to chat_frame.php file after line 20 as a new line and check time by refreshing the chat box
date_default_timezone_set('Europe/Amsterdam'); 
add it after $parser = new postParser(); - it looks like below
$parser = new postParser();
date_default_timezone_set('Europe/Amsterdam');
while($row = $db->fetch_array($result))
works ty!