Questions about the java. Text.SimpleDateFormat class setLenient (false)

the code is as follows

public static void main(String[] args) {
        String text = "2018-11-26-13:50:00";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-hh:mm:ss");
        sdf.setLenient(false);
        try {
            System.out.println(sdf.parse(text));
        } catch (ParseException e) {
            //  java.text.ParseException: Unparseable date: "2018-11-26-13:50:00"
            e.printStackTrace();
        }
    }

setLenient (false), the date midhour is operational from 1 a.m. to 12:00, and an error is reported between 13:00 and 00:00
ask the great god to solve the doubt.

Feb.27,2021
The

setLenient method is to set whether a given format can be handled with tolerance in the event of an error.
when the value is set to false, the given string is not tolerated. In this case, hh represents a 12-hour base time, and only 12 hours are available. Change it to HH, to indicate a 24-hour base time.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32d4b-2b1ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32d4b-2b1ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?