noccylabs/realtime $ git tag $ git branch * master
RealTime: DateTime on Steroids
Install using the experimental package repository.
RealTime works just like DateTime, only with more awesome. Create one just as you would:
$now = new RealTime();
The first thing you will notice is that 1) RealTime instances are automatically string-casted, so you can dump them as is, and 2) RealTime timestamps are created with microseconds by default:
echo $rt . "\n"; // -> '2015-08-21 13:49:17.810053 +0200'
It can also be used to turn any timestamp into UTC:
$utc = $when->toUtc();