How does the expansion of the universe affect time?
Time is created as the universe expands. Before the beginning of the expansion of the universe time did not exist.
The theory of the Big Bang implies that there was a superdense ball of matter. Before the ball started its expansion there was no time or space. Time and space are created by the expansion of the universe.
The theory of relativity and the equations that are part of the theory shows that time is meaningless at the speed of light. At the speed of light time ceases to exist or become infinite. One day is the same as the duration of 1000 years and 1000 years is the same as 1 day.
Also time is affected by the presence of mass. At the boundary of a black hole mass is so great that light can not escape from the black hole. At the boundary of a black hole time slows down to the point that time stops.
Time and the expansion of the universe are linked. The stars that are billions of light years away, may have light that left the star just yesterday.