Ensure records are correctly sorted by creation date.

Previously records were only being sorted correctly on Firefox, and
Safari and Chrome etc. were displaying them in a different order.
Fixed by ensuring that the sort is always done on the number of
seconds since epoch.