XF 2.0 Trying to save UTC timestamp...

Matt C.

Well-known member
I'm importing JSON data and one of the values is a UTC timestamp. Example 1544554860000.

When I try to import it with my cron entry I get the following error:
Code:
Please enter a number that is no more than 4294967295.

If I do this to try to convert it to a UNIX timestamp strtotime($timestamp), I get this:

Code:
Please enter a number that is at least 0.

Does anyone know what to do? Thank you.
 
Are you sure that's a unix timestamp? If so, it represents 30/12/50914...

It looks like it might be a millisecond value - in which case you need to divide by 1000: 1544554860.

Liam
 
Are you sure that's a unix timestamp? If so, it represents 30/12/50914...

It looks like it might be a millisecond value - in which case you need to divide by 1000: 1544554860.

Liam

That's what the creator of the API said. Thanks Liam, that worked!
 
I guess its from Node generated API.

In JavaScript Date.now() returns timestamp in milliseconds, in PHP time() returns timestamp in seconds.
 
Back
Top Bottom