So work out the distance to your horizon, and then the sunset time for that number of miles to the west for the sunset time at your current position and altitude.
The sun doesn't set exactly to west.
In mid-summer in the southern hemisphere there will be a latitude with almost 24 hours of daylight, which provides an extreme example. The sun will set just to the west of South, rising a few minutes later just to the east of South. On a high enough mountain there, the sun would not set at all - you would be looking 'over the top of' the pole.
Another famous example is the final flight of Amelia Earhart, toward Howland Island. Her navigator Fred Noonan timed sunrise and so established a 'line of position' running 157/337, rather than North and South.
Unfortunately, I don't know the answer to the OP's question.