Skip to content

Commit

Permalink
Arreglada fecha y hora
Browse files Browse the repository at this point in the history
  • Loading branch information
Pastorsin committed Mar 3, 2021
1 parent efa8408 commit 542a6e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/laboratorio/app/controllers/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.ZoneId;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;

import laboratorio.app.models.Product;
import retrofit2.Call;
Expand Down Expand Up @@ -36,6 +39,7 @@ private ObjectMapper buildObjectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SSS'Z'"));
objectMapper.setTimeZone(TimeZone.getTimeZone("GMT-12"));

return objectMapper;
}
Expand Down

0 comments on commit 542a6e8

Please sign in to comment.