Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
youfanx committed Sep 15, 2023
1 parent 77e70ef commit d3861ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rxlib/src/main/java/org/rx/bean/DateTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static DateTime utcNow() {
public static DateTime valueOf(@NonNull String dateString) {
Throwable lastEx = null;
int offset = dateString.length() >= 23 ? 0 : 3;
int len = 3, fb = 6;
int len = offset + 3, fb = 6;
for (int i = offset; i < len; i++) {
try {
return valueOf(dateString, FORMATS[i]);
Expand Down
4 changes: 4 additions & 0 deletions rxlib/src/test/java/org/rx/core/TestCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,10 @@ public void rasTest() {

@Test
public void json() {
System.out.println(DateTime.valueOf("2020-02-04 00:00:00"));
System.out.println(DateTime.valueOf("2020-02-05 00:00:00.000"));
System.out.println(DateTime.valueOf("20200206000000000"));

// RxConfig.INSTANCE.getJsonSkipTypes().add(ErrorBean.class);
Object[] args = new Object[]{str_name_wyf, proxy(HttpServletResponse.class, (m, i) -> {
throw new InvalidException("wont reach");
Expand Down

0 comments on commit d3861ec

Please sign in to comment.