package com.yeejoin.amos.boot.module.jxiop.biz.utils;

import java.time.LocalTime;

public class MockUtil {

    public static String getMockStart()
    {
        return "2024-11-22 16:00:00";
    }

    public static String getMockEnd()
    {
        // 获取当前时间（不含日期）
        LocalTime now = LocalTime.now();
        // 提取时、分、秒
        int hour = now.getHour()-8;    // 0-23
        String hours = String.valueOf(hour);
        if(hour<10)
        {
            hours="0"+hours;
        }
        int minute = now.getMinute(); // 0-59
        String minutes = String.valueOf(minute);
        if(minute<10)
        {
            minutes="0"+minutes;
        }
        int second = now.getSecond(); // 0-59
        String seconds = String.valueOf(second);
        if(second<10)
        {
            seconds="0"+seconds;
        }
        return "2024-11-23 "+hours+":"+minutes+":"+seconds;
    }
}
