I can't say that I know a better way. I don't have lights in my snake's enclosure and I keep it in my living room. As a result, he has light from when I get up in the morning until when I go to bed at night. Sometimes, that's 18 hours. I haven't noticed any ill effects.
I'll add that I think that his day/night cycle is influenced by other things than just the amount of light. My snake's active in the evenings even though the lights are on. He doesn't wait for the lights to go out.