i make a date in laravel with carbon
$date = Carbon::createFromDate(2018,02,16);
how should i change it to milliseconds?
something like this:
18:16:30 -> 1532785457060
This works in laravel 5.5
with carbon 1
.
$timestamp = (int) round(now()->format('Uu') / pow(10, 6 - 3));
this is actually what getPreciseTimestamp(3)
in carbon2
does.