How to obtain UTC at Midnight Timestamp with java.time.Instant and ChronoUnit?
I am trying to get UTC at Midnight Timestamp in format. For example, if today were Feb 10 2017, then correct date: Fri Feb 10 00:00:00 UTC 2017 which is equal to timestamp: 1486684800000 (I want for current date and time).
I tried
Instant.now
Instant.now.getEpochSecond to pass in JSON it end up in error
Error :
"statusCode":400,"titleMessage":"Value not allowed","userMessage":"The date with time stamp 2,022 is not in UTC at midnight
Please suggest a solution