I have a scenario where a system remains down each day from 18:00 to next day 07:00 for all working days (in short, "Mon - Fri, 18:00 to 07:00"). That means, each week day system is going down at 18:00 and getting up at 07:00 next day morning. Outside this time range, system is down e.g. from Friday 18:00 till Monday 07:00. I need to store this time and match in my java application against current time to see if the above system is up or not.
Can you please suggest how should I proceed storing the system down timing (may be in a variable) and match against current time in my application to find out if system is down at current time or not? I need to do this using Java.
I tried multiple Java documentation for date and time, but couldn't get anything useful in this situation.