1、mysql
字段名稱 類型
begin_time TIME
begin_time=08:18:39
2、java數據庫連接串
jdbc:mysql://x.x.x.x:3306/y?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
3、java獲取begin_time值
22:18:39
原因:時區問題導致。
解決:
連接串中加入:&serverTimezone=GMT%2B8,即可。完整如下:
jdbc:mysql://x.x.x.x:3306/y?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8
