Update code/chat.js

Problem:
"#chatinput time" use "toLocaleTimeString().slice(0, 5)" to get time, but hh:mm not alway at 0-5 in all locale

Fix:
Use "toISOString().slice(11, 16)" to get time for "#chatinput time"