I run findbugs against all of my code and only tackle the top stuff. I finally got the top stuff resolved and now am looking at the details. I have a simple entity, say a us
I'd prefer to store Date as Long in EpochTime format and use that for persisting across my application layers. That does not need any extra overriding of Lombok getters. Finally while providing the response, I can have an util function which will convert the epoch timestamp to a date and then return it as a string. May be do something like below ::
private String Epoch_to_ISO8601(Long savedTimeStamp) {
Date passedDate = new Date(savedTimeStamp);
String ISO8601_date =
DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssX")
.withZone(ZoneOffset.UTC)
.format(passedDate.toInstant());
return ISO8601_date;
}