$params['sort'] = array('updated_at');
However I found performing a descending sort much less intuitive. Eventually I figured out it should be:
$params['sort'] = array('updated_at:desc');
Formatting of data should only occur in the final steps of output. Until that point, and as a rule, internally data should remain in a base format that can easily be converted into many others – without being converted into another more basic format first.
For example Unix timestamp for dates or a floating point number for money. Both can readily be converted into more expressive formats without writing code to first parse or disassemble the initial format.
However in a situation where the flow is very specific and unlikely to ever be used to generate a different output it is permissible, even desirable, to generate data in the format it will be finally outputted.
For the last few years I have listened to the podcasts from SXSW while travelling to work or more recently while at gym.
Each year the number of podcasts has increased to the point where this year I am now too lazy to click through to every page and DownThemAll!. Besides it’s more fun to write a bash script to do the heavy lifting.