The passage does not give a time. From other Scripture we understand that this heavenly rebellion occurred in the period between God's finishing his creation (Genesis 1:31) and the serpent’s appearance in the Garden (Genesis 3:1). See further Revelation 12:7.
4 His tail swept down a third of the stars of heaven and cast them to the earth. And the dragon stood before the woman who was about to give birth, so that when she bore her child he might devour it.