truonglv
Well-known member
Hi. This is more steps but i will give it now.
In php i return an HTML date by call like this.
Then in js I have do this.
The result show full time. Eg: Aug 27, 2015 at 6:55 PM. It should show A few seconds.
In php i return an HTML date by call like this.
PHP:
$datetimeHtml = XenForo_Template_Helper_Core::dateTime(
XenForo_Application::$time, 'html'
);
return json_encode('datetimeHtml' => $datetimeHtml);
Then in js I have do this.
PHP:
$(ajaxData.datetimeHtml).xfInsert('appendTo', $container);
The result show full time. Eg: Aug 27, 2015 at 6:55 PM. It should show A few seconds.