I need to persist timestamps in my MySQL database that are accurate down to milliseconds. In order to get a string representation of the current system time that is accurate to that level, I need to use the PHP class DateTime. But when I try and create an object:
$ts = new DateTime(); $str = ts->format('Y-m-d H:i:s:u');
The logs complain about 'MyProject\Models\DateTime' not being found (I am using namespaces in this project and the object in question is a Model). Thoughts?