In the past I tried various different times ranging from 6:30pm to 9:00pm. Even taking it at a suboptimal time is better than not taking it at all.
There are also a few other things I do to keep my sleep schedule on track:
1) I heavily use bluelight filters on my computers and phone in the evening. Redshift/gammastep on Linux gives me full control.
2) I have low blue light lights which I use in the evening [0], then I switch to fully red bulbs in the hour before going to sleep.
3) I have a super bright daylight LED lamp which turns on automatically at 8:30am, a few minutes before I wake up. This is my solution to automate light therapy [1].
All of this combined lets me function mostly like a normal person. Hope some of that helps.