Commit 049a77c4 authored by Jeremy Mikola's avatar Jeremy Mikola

Resolve todo items for UTCDateTime construction

parent fa1523ac
......@@ -87,8 +87,7 @@ class WritableStream
'_id' => $options['_id'],
'chunkSize' => $this->chunkSize,
'filename' => (string) $filename,
// TODO: This is necessary until PHPC-536 is implemented
'uploadDate' => new UTCDateTime((int) floor(microtime(true) * 1000)),
'uploadDate' => new UTCDateTime,
] + array_intersect_key($options, ['aliases' => 1, 'contentType' => 1, 'metadata' => 1]);
}
......
......@@ -150,9 +150,7 @@ class SpecFunctionalTest extends FunctionalTestCase
}
if (isset($value['$date'])) {
// TODO: This is necessary until PHPC-536 is implemented
$milliseconds = floor((new DateTime($value['$date']))->format('U.u') * 1000);
$value = new UTCDateTime((int) $milliseconds);
$value = new UTCDateTime(new DateTime($value['$date']));
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment