This is required by the pdf viewer, since the files app on master uses the AppFramework it had applied the more strict defaults which made it not work on master.
There is no need to calculate a human readable date on the server side.
We supply the mtime and a client can easily convert that himself if
needed. This is already done most of the time since the date is often
not in the exact right format.
There is also no need to attach icon info. We have that available in
javascript. And else the client should get the right icon based on the
mimetype for its platform.
* Updated tests
This checks if the offset exists before accessing it and also adds unit tests to this function which would have catched this before 🙈
Fixes https://github.com/owncloud/core/issues/14277