Different record lengths based on the time of the day

Hi,

Recently there are a lot of thiefs active in our neighborhood.
I would like to have a longer record clip length in the night so I have more chance to record something suspicious. When it is day I would have a normal record clip length when the camera sees movement and start to record.

Is this possible to solve with an automation ?