Skip to content

Commit db586a5

Browse files
AlejandroPAlejandro Panizza Carve
andauthored
- fix datetime format values for REST API (#969)
* - fix datetime format values for REST API * - Fir DATE return format in remote calls --------- Co-authored-by: Alejandro Panizza Carve <[email protected]>
1 parent bc38bb3 commit db586a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/src/main/java/com/genexus/internet/GXRestAPIClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public class GXRestAPIClient {
5454
public enum DateFormat {
5555

5656
DATE_FMT(1, "yyyy-MM-dd"),
57-
DATETIME_FMT(3, "yyyy-MM-dd'T'HH:mm:ss"),
58-
DATETIME_FMT_MS(4, "yyyy-MM-dd'T'HH:mm:ss.SSS");
57+
DATETIME_FMT(2, "yyyy-MM-dd'T'HH:mm:ss"),
58+
DATETIME_FMT_MS(3, "yyyy-MM-dd'T'HH:mm:ss.SSS");
5959

6060
private final int fmtId;
6161
private final String fmtString;
@@ -336,7 +336,7 @@ public Date getBodyDate(String varName) {
336336
if (val.startsWith(DATE_NULL))
337337
return CommonUtil.newNullDate();
338338
else
339-
return new SimpleDateFormat(DateFormat.DATETIME_FMT.getFormat()).parse(val);
339+
return new SimpleDateFormat(DateFormat.DATE_FMT.getFormat()).parse(val);
340340
}
341341
catch (ParseException e) {
342342
return CommonUtil.newNullDate();

0 commit comments

Comments
 (0)