Skip to content

Commit 6846929

Browse files
Change REST API date responses to UTC for consistency
1 parent 15c9f0b commit 6846929

File tree

3 files changed

+5
-42
lines changed

3 files changed

+5
-42
lines changed

Diff for: modules/flowable-common-rest/src/main/java/org/flowable/common/rest/util/DateToStringIso8601Serializer.java

-37
This file was deleted.

Diff for: modules/flowable-common-rest/src/main/java/org/flowable/common/rest/util/DateToStringSerializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
public class DateToStringSerializer extends JsonSerializer<Date> {
2828

29-
protected DateTimeFormatter isoFormatter = ISODateTimeFormat.dateTime();
29+
protected DateTimeFormatter isoFormatter = ISODateTimeFormat.dateTime().withZoneUTC();
3030

3131
@Override
3232
public void serialize(Date tmpDate, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {

Diff for: modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/query/ExternalWorkerJobResponse.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import java.util.Date;
1717

18-
import org.flowable.common.rest.util.DateToStringIso8601Serializer;
18+
import org.flowable.common.rest.util.DateToStringSerializer;
1919

2020
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
2121

@@ -69,11 +69,11 @@ public class ExternalWorkerJobResponse {
6969
protected String exceptionMessage;
7070

7171
@ApiModelProperty(value = "The due date for the job", example = "2021-05-04T16:35:10.474Z")
72-
@JsonSerialize(using = DateToStringIso8601Serializer.class, as = Date.class)
72+
@JsonSerialize(using = DateToStringSerializer.class, as = Date.class)
7373
protected Date dueDate;
7474

7575
@ApiModelProperty(value = "The creation time of the job", example = "2020-05-04T16:35:10.474Z")
76-
@JsonSerialize(using = DateToStringIso8601Serializer.class, as = Date.class)
76+
@JsonSerialize(using = DateToStringSerializer.class, as = Date.class)
7777
protected Date createTime;
7878

7979
@ApiModelProperty(value = "The tenant if of the job", example = "flowable")
@@ -83,7 +83,7 @@ public class ExternalWorkerJobResponse {
8383
protected String lockOwner;
8484

8585
@ApiModelProperty(value = "The time when the lock expires", example = "2020-05-04T16:35:10.474Z")
86-
@JsonSerialize(using = DateToStringIso8601Serializer.class, as = Date.class)
86+
@JsonSerialize(using = DateToStringSerializer.class, as = Date.class)
8787
protected Date lockExpirationTime;
8888

8989
public String getId() {

0 commit comments

Comments
 (0)