Hello Ndh,
Yes you can start a recording on sunset.
And stop it at a specific time or make it run for a specific duration using time code.
To do this you can use the Scheduler (and Timecode) action list(s), to control the playstate of a recording.
Best regards,
Guido