[SOLVED] How to create a Timer to switch off a light?

Glad to read that you got some further info/clarity.
You are not offering much information, which makes it hard to guess what went wrong. Would highly recommend to read this post (forgot to add this post to the list above):

  • How did you install OH on your system?
  • Which version are you running?
  • Do you see any errors in your log file?
  • Do you see any errors during start-up?
  • What do you exactly mean by "the internal clock was different from the real time? How much different, how did you notice, and what did you do?
  • As it may be RPI configuration problem, did you check the raspberry forum pages for help?

If you had not done so already, may be it is a good idea to start fresh with openHABian (see docs), this will configure most if not all of the basics for you and is likely to take care of this issue too (if it is just a misconfigured RPi).