package com.zksy.environment.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @Description
 * @Date 2021- 06-08-下午 16:38
 * @auther Javen
 */
public class DateTimeUtil {
    /**
     * 获取现在时间
     *
     * @return返回时间格式
     */
    public static LocalDateTime parseDateTime(String str) {
        DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
        LocalDateTime ldt = null;
        try {
            ldt = LocalDateTime.parse(str, format);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ldt;
    }
}
