How to optimize the time of the site?

Is the server is in Russia, respectively, time (timezone) is taken from the location server(Moscow). When entering from other countries, Tyson shows the time location of the server, not the country or tisone. How it's done, and in what ways ?
For example, social networks show the time zone where the person is located.
July 4th 19 at 23:18
3 answers
July 4th 19 at 23:20
I use
Defines timzone on the client side.
Example usage:
var tz = jstz.determine();
var timezone =;
July 4th 19 at 23:22
In social networks indicated the city of thy dwelling place, therefore it is not difficult in the database to see what city what timezone. In your case you need to combine geoip and timezone.
you can detail how to do this ? - Rylee11 commented on July 4th 19 at 23:25
July 4th 19 at 23:24
var t = new Date();
t.setTime(<?= strtotime('now') ?>);

Find more questions by tags MySQLPHPTime management