Samsung Galaxy Ace locks automatically when clock application is selected
I had the same problem, and solved it by simply re-setting the "Screen timeout" option in display settings. It seems some app messed it up.