Recently there was a study on here that said the sun is good for you. And its effects were underrated.it threw a shadow over big pharma because 1 in very many gets skin cancer.
I think how "good" prolonged exposure to direct sunlight is might vary wildly between demographics. I'm of Viking extraction (pale as a ghost). I quite literally get sunburn indoors if I'm not careful, no exaggeration. I can't see that being good in the long-term, especially when my aunt had melanoma.
Following WWII, my gruncle lived in Africa as his skin grafts wouldn't take in the British climate. He was like a patchwork quilt of grafts following his plane being shot down. Most white expats in Africa got nose cancer from the sun eventually. He moved back eventually, but had stayed out of the sun and never got nose cancer.
I am pasty white and used to burn very, very easily. Sunscreen every day, burned if I walked in the sun half an hour. When we changed our diets to vaguely keto, I stopped burning. It is super, super weird. YMMV, this is not advice, etc. I offer it only as a fellow "the sun looked at me wrong and I got burned" traveler.