U
U
Us592020-05-27 20:07:56
PHP
Us59, 2020-05-27 20:07:56

How to generate correct timestamp?

There is a timestamp:
1590598380386

I'm trying to generate like this:
round((microtime(true) * 1000) - (60*60*3/1000)
I get:
1590599116227

But this is not correct, and as a result, the request does not pass.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2020-05-27
@Us59

What do you want to do?
round((microtime(true) * 1000) - these are milliseconds
60*60*3/1000 - and this? Do you want to take away 10 milliseconds?

D
Dmitry Gordinskiy, 2020-05-27
@DmitriyGordinskiy

time()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question