ZveroBoy 0 Posted March 5, 2015 Report Share Posted March 5, 2015 Давно уже стоит сей чат. Проблема в том - что время сообщений а именно - добавлено "Сегодня в 16:33:44" уже третий день а пишет что сообщение добавлено сегодня. В истории сообщений на 1 день меньше , но сообщения эти я писал позавчера в 16... Как решить проблему? Quote Link to post Share on other sites
ZveroBoy 0 Posted March 5, 2015 Author Report Share Posted March 5, 2015 function ShowDate($format, $time_add) { global $langdate, $config, $chat_lang; $today = strtotime(date("Y-m-d.", time()+ ($config['date_adjust']*60))); if ($time_add > $today) return $chat_lang['today'] . date ("H:i:s", $time_add); elseif ($time_add > ($today - 86400)) return $chat_lang['yesterday'] . date ("H:i:s", $time_add); else return @strtr(@date($format, $time_add), $langdate); Мне кажется что ошибка где-то тут. Quote Link to post Share on other sites
Zivler 398 Posted March 5, 2015 Report Share Posted March 5, 2015 В iChat обновление времени происходит в момент добавления сообщения. Добавьте новое сообщение и увидите, как в старых сообщениях время обновится. ZveroBoy 1 Quote Link to post Share on other sites
ZveroBoy 0 Posted March 5, 2015 Author Report Share Posted March 5, 2015 Точняк! Спасибо. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.