I'm trying build rest api with spring boot. and got stuck:
Value in mysql: 2018-06-13 10:45:17 (datetime)
When I got it by java: Wed Jun 13 10:45:17 ICT 2018
But json return(format: yyyy-MM-dd HH:mm:ss): 2018-06-13 03:45:17
why HH:mm:ss is 03:45:17, it must 10:45:17 ?
my code getter function:
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
public Date getUpdatedAt() {
return updatedAt;
}
Can you help me in this case?
Thanks for your time!