If you mean you want to fast forward time passing so you can see sunset and sunrise during your game then you have to set a custom race length of 3 hours (so you drive for 3 hours) but set the time multiplier to x8 (24h / 3h = 8).
The time multiplier does not accelerate tyre wear, break pad wear or fuel consumption so it will not be a full simulation of a 24 hour race other than time of day.
Hope this helps.