stable sort order for photos with identical timestamps