How to implement the output of time in the chat in accordance with the time zone? I tried on js time zone to write to cookies
var TimeZone = Dates.getTimezoneOffset()/60; document.cookie = "TimeZone="+TimeZone; and then in php record the time in UTC in the chat and bring such manipulations
date("dmY H:i:s", time() + ($_COOKIE['TimeZone'] * -1) * 60 * 60); But I did not get the desired result, it is normal for me, and for some it does not correctly show.
Update
date_default_timezone_set("UTC"); I added this to the file before sending SMS to the database, after I output it, but the browser does not translate to the desired date, I do not use the code in the output above.