@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy", timezone = "Asia/Kolkata")
private Date activationDate;
From the above java code, I want to set timezone value as Current System timezone using below: TimeZone.getDefault().getID() - it returns value as "Asia/Kolkata"
But if i set this code to json format
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy", timezone = TimeZone.getDefault().getID())
I am getting error like "The value for annotation attribute JsonFormat.timezone must be a constant expression"
Pls help me to solve this issue.
Thanks in advance, Vishnu