I have a world set to keep after a character dies.
I had a character encounter a portal storm, during the portal storm the portal storm effect that temporarily snuffs out the sun activated (The text from the log is “The sun is snuffed out like a candle.”), then my character died.
I created a new character and the sun was still gone, I travelled back to where the portal storm was and the storm is no longer there. I also tried waiting for a day in-game.
Is there any way either by using the debug menu or by manually editing the game’s files to recover the sun? It makes the game much harder.
Are you absolutely set on keeping this world? If not, making a new world should fix that instantly.
But if you want to stick around, try encountering another portal storm. Once it triggers the sun-blotting event again it should return to normal.
If that doesn’t work, you should really make a bug report. Will be happy to assist you there.