Spot period considerations in yield curves

Textbook explanations of yield curve modelling discuss bootstrapping or other methods. If we take sovereign bonds for deriving the curve, we would get price data from a market data provider like Bloomberg.

However, the prices on a specific date $t$ are actually prices for the settlement date $t+x$ (e.g. $t+1$ or $t+2$ in some countries). Therefore, the curve that results from our model is not a spot curve, but a forward curve. How does one in practice take into consideration this time lag (spot period) for creating spot / zero-coupon curves? I could guess that one uses overnight or repo rates for additional discounting of the bonds, but I would be interested in actual market practice.

This bothered me a great deal when I started out years ago =P

In curve construction, we unofficially have the concept of an "anchor date," which is the date on which the discount factor is 1.

In swap curve construction, most market participants set the anchor date to "today" (the trade date). So a USD "spot" swap is actually a 2-day forward swap.

In government curve construction, it is actually more common to set the anchor date to the spot settlement date (e.g., $\text{today} + 1$ for the US). In cases where the anchor date does need to be today, we simply discount the curve back to today using repo, as you suggested.

If a curve is constructed using "today" as the anchor date, when it's used to discount bond cash flows, you need to be careful to discount the market bond price back to today to be consistent with your curve:

$$(P + AI) \cdot d(\text{settlement date}) = \sum_{i=1}^n c_i \cdot d(t_i).$$

These are not hard rules at all. In practice, it's always best to consult your traders to see what they want.