D
D
ddddd tttt2018-03-19 05:45:53
PHP
ddddd tttt, 2018-03-19 05:45:53

How to compare client and server time with different timezones?

It is necessary to compare the time data that is generated on the server and that comes from the client. How to work with this time, the time zone will come along with the client's request.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
@
@smple, 2018-03-19
_

you need to convert all the time to one time zone for example UTC and then compare.
javascript get date in UTC

D
Denis, 2018-03-19
@sidni

if I'm not mistaken, you will have all the time from the server, in order to get the client's time, then you need to generate it using client tools, for example, javascript (but you need to take into account that the client may not have the correct time relative to the world time, not everything in the same example correctly indicates the time zone in the operating system )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question