1

I use MySQL database, I want to update a date column, console show this info:

 update license_user SET account = ?, password = ?, salt = ?, status = ?, type = ?, email = ?, phone = ?, lastLoginDate = ?, lastLoginIp = ?, createDate = ? where id = ? 
[com.manji.persist.mapper.UserEntityMapper.updateByPrimaryKeySelective]-[DEBUG] - ==> Parameters: usertest_(String), Tx+G003oENaw9OtwBsEasQ==(String), 9876463965d11612c1c65cc01c6214d3(String), 0(Integer), 0(Integer), xxxxxxxxx@126.com(String), xxxxxxxxx(String), 2017-01-26 16:34:29.498(Timestamp), 127.0.0.1(String), 2017-01-11 14:00:00.0(Timestamp), 4(Long)

Date value is 2017-01-26 16:34:29.498, but database insert a different value 2017-01-26 02:34:29,I don't know how to solve this problem, can you give me some advice,thx very much.

Arnaud
  • 17,229
  • 3
  • 31
  • 44
JstCoding
  • 11
  • 2
  • 1
    I would bet on a convertion from current Timezone to UTC. Is your column type Datetime or Timestamp ? + for the milliseconds troncated, the column must accept them, [see here](http://stackoverflow.com/a/26299379/7076047) – blackwizard Jan 26 '17 at 10:24

0 Answers0