Unable to serialize date in AEST timezone from UTC using @JsonFormat. Why?

Viewed 260

Below is the code to serialize date in AEST time zone but this doesn't work.

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd 
HH:mm:ss", timezone = "Australia/Sydney")
private LocalDateTime lastUpdatedTime;

Though I am able to convert it to the above mentioned date format but not in the TZ.

The date in UTC I am trying to convert is for eg. "2019-09-23T23:39:45.917Z"

How to solve this ?

0 Answers
Related