mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix test
This commit is contained in:
parent
d41b864711
commit
d58fc4409a
@ -5,9 +5,7 @@ import cn.hutool.core.date.BetweenFormatter.Level;
|
|||||||
import cn.hutool.core.date.format.FastDateFormat;
|
import cn.hutool.core.date.format.FastDateFormat;
|
||||||
import cn.hutool.core.lang.Console;
|
import cn.hutool.core.lang.Console;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.SystemPropsUtil;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -692,12 +690,11 @@ public class DateUtilTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void parseCSTTest() {
|
public void parseCSTTest() {
|
||||||
Console.log(SystemPropsUtil.get("java.version"));
|
|
||||||
String dateStr = "Wed Sep 16 11:26:23 CST 2009";
|
String dateStr = "Wed Sep 16 11:26:23 CST 2009";
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(DatePattern.JDK_DATETIME_PATTERN, Locale.US);
|
SimpleDateFormat sdf = new SimpleDateFormat(DatePattern.JDK_DATETIME_PATTERN, Locale.US);
|
||||||
|
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||||
final DateTime parse = DateUtil.parse(dateStr, sdf);
|
final DateTime parse = DateUtil.parse(dateStr, sdf);
|
||||||
|
|
||||||
DateTime dateTime = DateUtil.parseCST(dateStr);
|
DateTime dateTime = DateUtil.parseCST(dateStr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user