Create daily lighting

How do I create a daily turn on?
But that the user can change via the gui and not via the code (.item )


Not sure, I understand.
the .items files do not have code in them (well very limited), any automated action would need to be triggered by rules. But in its easiest case, you just have to define the items and map them on your sitemap to allow GUI interactions.
If not already done so, you may want to review the documentation, start here: if applicable read the tutorial for beginners and the user manual starting with introduction.
You may be able to lend some code for the rules that trigger what you want to do from here: Design Pattern: Time Of Day

I know that i need to put it in the rules

I want after I have write the rules if the user has to change the time he will not have to change the rules he will be able to change in gui and it will be updated to another hour / day

I’ll try the link you brought (Design Pattern: Time Of Day2)

Thank you

If I understand you correctly, I believe you are looking for a way that the
user can type in a new time or date that is then used in your rules.
If so, you need to know that there is NO input field in the Rules DSL.

OpenHab has a Setpoint option. I have used that for other purposes, so I have not tried that myself, but perhaps you could have a rule subtract or add the value in that setPoint from or to the normal time.
I guess it would be something like:

item ‘setpointitem’ triggered
add to programmed time

But that in proper Java ofcourse

As said, I use it for a different purpose but this is what the setpoint looks like:

Could have one for the day and one for the hour

You need to follow one of the Alarm Clock examples:

Thanks everyone for the answers.
I will try the answers I received and update.