Java JDBC: dates consistently two days off

前端 未结 9 1830
孤城傲影
孤城傲影 2020-12-14 16:53

I am using Java JDBC to write a date to SQL server 2008 and then read it back.
The date that is read back is consistently two days earlier than the date that was actuall

9条回答
  •  無奈伤痛
    2020-12-14 17:01

    like what user903724 said, change to version 4 that would be fixed, but in my case, When I'm using sqljdbc4-3.0.jar, this issue still reproduces, but I change it to sqljdbc42.jar, this issue got fixed. Hope my experience would be helpful. download from sqljdbc42.jar

提交回复
热议问题