The task is as follows:

The user from China added material to the site and the time in the database was entered to it (Chinese). For example, 15:40, and I, the user from Moscow. And I have a time of 20:40. How to do the following:

The user from China should see the time of adding the material - 15:40, and I, from Moscow - 20:40.

What is the implementation algorithm?

  • Users registered or whatever? - Palmervan

1 answer 1

To write server time in the database, and on the client it is time to change depending on the user's time zone

  • it is not right to write the user's time at all. Confusion will turn out. I agree with @Andrey Sovetkin that it is better to write server time - Maksym Prus
  • I support, the time of the user to write is generally stupid) - thunder
  • And even better - to write UTC .... - gecube