i m using thing code to check start time and end time of user is this a correct approach ?
OffsetTime currentTime = OffsetTime.now();
OffsetTime setTime=OffsetTime.parse("04:00:00.000+05:00");
System.out.println(currentTime);
System.out.println(setTime);
System.out.println(currentTime.isBefore(setTime));
System.out.println(currentTime.isAfter(setTime));
String request=JOptionPane.showInputDialog(null, "I want to quit work");
if(request.equals("y")){
if(currentTime.isAfter(setTime))
System.out.println("you are granted to leave");
}
else if(currentTime.isBefore(setTime)){
System.out.println("its working hours");
}