If you’re on Android, I think this still works. Try setting an alarm for 5 minutes from now and turn your phone off. It should turn back on for the alarm.
Edit: Just tried it and it worked on the native OnePlus clock app, but not on the Google clock.