What's wrong with the timestamp?

A little backstory:
Changed crontab to run the script not using wget and using /usr/bin/php and then came a problem:

In the script, which is started there is a line:
CURLOPT_URL => "https://urladdress.com&timestamp=" . round((microtime(true) * 1000) - (60*60*3/1000)) . "",

And sent curl request, but the problem is that if the script is running via cron is configured by /usr/bin/php I get the error in the curl.. probably due to the fact that timestamp is not correct.

Tried manually using the browser to run the same php file and it WORKS.
Magic it would seem, but apparently I don't know, tell me please?)
April 19th 20 at 12:19
2 answers
April 19th 20 at 12:21
in one case, the timestamp in seconds
in the other, in milliseconds

that is, you need to multiply\divide by 1000
April 19th 20 at 12:23
- (60*60*3/1000)
this is clear
microtime() and time() return now in unixtime which is UTC (GMT+0) and subtract 3 hours no need
Nothing has changed) - Lisette.Powlowski48 commented on April 19th 20 at 12:26
as well
or so

Well check the time on the server. Not lost if the clock. - susana.Sawa commented on April 19th 20 at 12:29

Find more questions by tags PHP