liusheng
2024-08-28 bedd0a1cef215538df64470df6b8d4a022189136
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.ruoyi.web.test;
 
import org.junit.Test;
 
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
 
//@SpringBootTest
//@RunWith(SpringRunner.class)
public class MQTest {
 
 
    @Test
    public void testSend22() {
        LocalTime now = LocalTime.now();
        System.out.println("当前时分: " + now.format(DateTimeFormatter.ofPattern("hh:mm")));
 
        // 获取下一分钟的时分
        LocalTime nextMinute = now.plusMinutes(1);
        System.out.println("下一分钟的时分: " + nextMinute.format(DateTimeFormatter.ofPattern("hh:mm")));
    }
 
 
}