Those who know the Supreme Brahman attain that Supreme by passing away from the world during the six months when the sun travels in the north
Bhagavad-gita As It Is
BG Chapters 7 - 12
Those who know the Supreme Brahman attain that Supreme by passing away from the world during the influence of the fiery god, in the light, at an auspicious moment of the day, during the fortnight of the waxing moon, or during the six months when the sun travels in the north.
When fire, light, day and the fortnight of the moon are mentioned, it is to be understood that over all of them there are various presiding deities who make arrangements for the passage of the soul. At the time of death, the mind carries one on the path to a new life. If one leaves the body at the time designated above, either accidentally or by arrangement, it is possible for him to attain the impersonal brahma-jyotir. Mystics who are advanced in yoga practice can arrange the time and place to leave the body. Others have no control—if by accident they leave at an auspicious moment, then they will not return to the cycle of birth and death, but otherwise there is every possibility that they will have to return. However, for the pure devotee in Kṛṣṇa consciousness, there is no fear of returning, whether he leaves the body at an auspicious or inauspicious moment, by accident or arrangement.