0

I have a (start_time) column which is of type timestamp with time zone. and I have a JPA mapping entity which reads as below,

@Column(name = "start_time")
@Temporal(TemporalType.TIMESTAMP)
private Date startTime;// (util.date)

My table has value "2017-08-09 09:57:00+05:30". When I use JPA to map the values, I get the value as "2017-08-09 09:57:00.0"

when I try to debug, I can see CDATE inside the date attribute which shows me the correct value with timezone. How to map this correctly?

1 Answer 1

2

Try to change @Column(name = "start_time") on @Column(name = "start_time", columnDefinition = "TIMESTAMP WITH TIME ZONE")

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.