如何解决数据库时区问题The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than one tim

    技术2023-11-02  101

    如何解决数据库的时区问题

    只需要在数据库连接地址上加上?serverTimezone=UTC即可解决时区的报错

    比如

    url: jdbc:mysql://localhost:3306/mybatis?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
    Processed: 0.033, SQL: 10