Same as normal, the riders that finish together all get the same time.
The difference is that the time is taken on the 4th rider, rather than the first, and none of the riders can be given a faster time.
Dropped riders get their actual time.
If it's the first stage, the first rider to cross the line gets to wear the jersey, on the basis of using placings to separate riders on the same time.