How can i persist date and Time with JPA Hibernate in MySql database ? -


i want persist date , time jpa in mysql database.

but problem is, date correct, not time. time 02:00:00

my implementation in entity class following:

@temporal(temporaltype.timestamp) private date date; 

and how set im action class date:

actualfactory.setdate(new java.util.date()); 

the result in db date colum today :

2015-09-30 02:00:00 


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -