Format seconds into a human-readable time string