You can call specific methods on the LocalTime
such as getMinute()
and getSecond()
, or you can use a DateTimeFormatter
with a pattern that you’re looking for, like:
d.format(DateTimeFormatter.of(“mm:ss”);
If you’re doing that, you don’t need to zero out the nano first.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…