I receive a UNIX timestamp from a URL like so:
/api/v1/order_variations/60?d=1508364000000
When I retrieve and try to convert the timestamp into a readable format, Carbon outputs the incorrect date.
$timestamp = (int)$request->input('d');
$date = Carbon::createFromTimestamp($timestamp)->format('j F, Y');
dd($date);
The value of $timestamp is 1508364000000.
Carbon converts this to "25 February, 49768" but it should be "19 October, 2017"
If I use:
Carbon::createFromTimeStampUTC($timestamp)->toDateTimeString();
I get the same result.
Any ideas what I could be doing wrong?