Fix for issue 3528 (A scheduled task should check that the start time has not passed)
Compare the current date with the date provided by the user, if the date provided by the user has passed, display an error message.
| | |
| | | SEVERE_ERR_LDAPCOMPARE_ERROR_READING_FILE_1668=An error occurred reading file \ |
| | | '%s'. Check that the file exists and that you have read access rights to \ |
| | | it. Details: %s |
| | | |
| | | SEVERE_ERR_STOPDS_DATETIME_ALREADY_PASSED_1669=The specified stop time '%s' \ |
| | | has already passed |
| | | |
| | | |
| | |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR; |
| | | } |
| | | // Check that the provided date is not previous to the current date. |
| | | Date currentDate = new Date(System.currentTimeMillis()); |
| | | if (currentDate.after(stopTime)) |
| | | { |
| | | Message message = ERR_STOPDS_DATETIME_ALREADY_PASSED.get( |
| | | timeStr); |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR; |
| | | } |
| | | } |
| | | } |
| | | |