Shops don't have opening times.
Shop-keepers have Business Hours.
If you have made a merchant, then the same tutorial you followed will probably tell you about NPC PACKAGES.
So, you setup a package - on your merchant - that has something like ...
1. 7am ... Go to Shop (and unlock)
2. 6pm ... Leave shop (and lock)
Job done

(if you can't find help, post and I'll route out a link)