package org.jeecg;

import org.apache.commons.io.IOUtils;
import org.jeecg.common.util.DateUtils2;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.FileOutputStream;
import java.io.IOException;

public class Test {

    @org.junit.Test
    public void test(){


        ZonedDateTime utc = ZonedDateTime.now(ZoneId.of("UTC+7"));
        LocalDateTime localDateTime = utc.toLocalDateTime();
        Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());

        System.out.println(utc.getDayOfWeek());

        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss");
        System.out.println(dateTimeFormatter.format(utc));
        ZonedDateTime beijingTime = ZonedDateTime.now(ZoneId.of("Asia/Shanghai"));
        System.out.println("Beijing Time: " + dateTimeFormatter.format(beijingTime));
//        Date date1 = new Date();
//        Date date2 = DateUtils2.getDate("2024-06-01 00:00:00");
//        String yyyymm = DateUtils2.getYYYYMM(date2);
//        String date = DateUtils2.getNowDay2(DateUtils2.currentXDayOfMonth(date2));
//        System.out.println(yyyymm);
    }

    @org.junit.Test
    public void test2(){
        Package pkg = IOUtils.class.getPackage();
        System.out.println("Commons IO Version: " + pkg.getImplementationVersion());
    }

}
