From a098560c8d646b35e186f1a8c8c7da1184711a3f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 6 Nov 2018 16:02:41 +0300 Subject: use juick date format in PMs --- juick-common/src/main/java/com/juick/Chat.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-common/src') diff --git a/juick-common/src/main/java/com/juick/Chat.java b/juick-common/src/main/java/com/juick/Chat.java index c4f105dc..59c0a2dc 100644 --- a/juick-common/src/main/java/com/juick/Chat.java +++ b/juick-common/src/main/java/com/juick/Chat.java @@ -1,5 +1,7 @@ package com.juick; +import com.fasterxml.jackson.annotation.JsonFormat; + import java.time.Instant; public class Chat extends User { @@ -10,6 +12,7 @@ public class Chat extends User { return lastMessageTimestamp; } + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "UTC") public void setLastMessageTimestamp(Instant lastMessageTimestamp) { this.lastMessageTimestamp = lastMessageTimestamp; } -- cgit v1.2.3