So for now, you need to use the deprecated Date class in Java:
.Date rightNow= new Date();
int hour= rightNow.getHours();
I am still trying to find a better supported way to solve this problem, but for now, deprecated code seems to be the best solution available.
Post a Comment