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

Resolve todo items for UTCDateTime construction

parent fa1523ac
...@@ -87,8 +87,7 @@ class WritableStream ...@@ -87,8 +87,7 @@ class WritableStream
'_id' => $options['_id'], '_id' => $options['_id'],
'chunkSize' => $this->chunkSize, 'chunkSize' => $this->chunkSize,
'filename' => (string) $filename, 'filename' => (string) $filename,
// TODO: This is necessary until PHPC-536 is implemented 'uploadDate' => new UTCDateTime,
'uploadDate' => new UTCDateTime((int) floor(microtime(true) * 1000)),
] + array_intersect_key($options, ['aliases' => 1, 'contentType' => 1, 'metadata' => 1]); ] + array_intersect_key($options, ['aliases' => 1, 'contentType' => 1, 'metadata' => 1]);
} }
......
...@@ -150,9 +150,7 @@ class SpecFunctionalTest extends FunctionalTestCase ...@@ -150,9 +150,7 @@ class SpecFunctionalTest extends FunctionalTestCase
} }
if (isset($value['$date'])) { if (isset($value['$date'])) {
// TODO: This is necessary until PHPC-536 is implemented $value = new UTCDateTime(new DateTime($value['$date']));
$milliseconds = floor((new DateTime($value['$date']))->format('U.u') * 1000);
$value = new UTCDateTime((int) $milliseconds);
return; 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