mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复ExcelReader读取时间变成12小时形式问题
This commit is contained in:
20
hutool-poi/src/test/java/cn/hutool/poi/IssueI5Q1TWTest.java
Normal file
20
hutool-poi/src/test/java/cn/hutool/poi/IssueI5Q1TWTest.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package cn.hutool.poi;
|
||||
|
||||
import cn.hutool.poi.excel.ExcelReader;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IssueI5Q1TWTest {
|
||||
|
||||
@Test
|
||||
public void readTest() {
|
||||
final ExcelReader reader = ExcelUtil.getReader("I5Q1TW.xlsx");
|
||||
|
||||
// 自定义时间格式1
|
||||
Assert.assertEquals("18:56", reader.readCellValue(0, 0).toString());
|
||||
|
||||
// 自定义时间格式2
|
||||
Assert.assertEquals("18:56", reader.readCellValue(1, 0).toString());
|
||||
}
|
||||
}
|
BIN
hutool-poi/src/test/resources/I5Q1TW.xlsx
Normal file
BIN
hutool-poi/src/test/resources/I5Q1TW.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user