Obteniu un mal moment a la data a la data Ús del descans de primavera

Aquesta és la meva classe de Pojo

public class TeTripCarDtl implements Serializable { private static final long serialVersionUID = -7601044160087552575L; @Id @Column(name = "CAR_ID") @GeneratedValue(strategy = GenerationType.IDENTITY) private long carId; @Column(name = "TRIP_ID") private long tripId; @Column(name = "VEHICLE_TYPE") private String vehicleType; @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", shape = JsonFormat.Shape.STRING) @Temporal(TemporalType.TIMESTAMP) @Column(name = "PICKUP_DATE_TIME") private Date pickUpDateTime;// Here I am getting wrong time value @Temporal(value = TemporalType.TIMESTAMP) @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", shape = JsonFormat.Shape.STRING) @Column(name = "RETURN_DATE_TIME") private Date returnDateTime;// Here I am getting wrong time value @Column(name = "PICK_UP_LOCATION") private String pickUpLocation; @Column(name = "DROP_OFF_LOCATION") private String dropOffLocation; @Column(name = "CONFIRMED_SPECIAL_EQUIP") private String confirmedSpecialEquip; @Column(name = "LAST_UPDATED_BY") private String lastUpdatedBy; @Temporal(TemporalType.DATE) @Column(name = "LAST_UPDATED_ON") private Date lastUpdatedOn; @Temporal(TemporalType.DATE) @Column(name = "BOOKING_DATE") private Date bookingDate; @Column(name = "STATUS") private String status; public long getCarId() { return carId; } public void setCarId(long carId) { this.carId = carId; } public long getTripId() { return tripId; } public void setTripId(long tripId) { this.tripId = tripId; } public String getVehicleType() { return vehicleType; } public void setVehicleType(String vehicleType) { this.vehicleType = vehicleType; } public Date getPickUpDateTime() { return pickUpDateTime; } public void setPickUpDateTime(Date pickUpDateTime) { this.pickUpDateTime = pickUpDateTime; } public Date getReturnDateTime() { return returnDateTime; } public void setReturnDateTime(Date returnDateTime) { this.returnDateTime = returnDateTime; } public String getPickUpLocation() { return pickUpLocation; } public void setPickUpLocation(String pickUpLocation) { this.pickUpLocation = pickUpLocation; } public String getDropOffLocation() { return dropOffLocation; } public void setDropOffLocation(String dropOffLocation) { this.dropOffLocation = dropOffLocation; } public String getConfirmedSpecialEquip() { return confirmedSpecialEquip; } public void setConfirmedSpecialEquip(String confirmedSpecialEquip) { this.confirmedSpecialEquip = confirmedSpecialEquip; } public String getLastUpdatedBy() { return lastUpdatedBy; } public void setLastUpdatedBy(String lastUpdatedBy) { this.lastUpdatedBy = lastUpdatedBy; } public Date getLastUpdatedOn() { return lastUpdatedOn; } public void setLastUpdatedOn(Date lastUpdatedOn) { this.lastUpdatedOn = lastUpdatedOn; } public Date getBookingDate() { return bookingDate; } public void setBookingDate(Date bookingDate) { this.bookingDate = bookingDate; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override public String toString() { return "TeTripCarDtl "; }}

Entrada JSON

Imprimeix Valors de la data a la consola, imprimeix així. Aquí, aconsegueixo que el clima sigui incorrecte, suposo que per obtenir l’hora 07:30:04, però tinc 13:00:04, excepte tot està bé

 PickUpDateAndTime:Sat Jun 10 13:00:04 IST 2017,ReturnDateAndTime:Sat Jun 10 13:00:04 IST 2017

Si us plau, necessito la teva ajuda amb això.

Deixa un comentari

L'adreça electrònica no es publicarà. Els camps necessaris estan marcats amb *