Skip to content

gdb: set session variables time_zone cause error #4759

Description

@seanlook

Go version

go1.24

GoFrame version

v2

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

Image

What did you see happen?

As mysql golang driver documented, we can set time_zone='+00:00' to change connection session time_zone variables.
https://github.com/go-sql-driver/mysql#loc

But when I use it in gf gdb, it cause error:

sql.Open failed for driver \"mysql\" by source \"...?charset=utf8&loc='+00:00'&charset=utf8&loc=UTC&time_zone=%27%2B00%3A00%27&parseTime=True\": unknown time zone ' 00:00'

It's seem that the loc,time_zone is misunderstood in gofr. all is fine in gorm / raq sql.Open

What did you expect to see?

give time_zone system variables back like https://github.com/go-sql-driver/mysql#system-variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt is confirmed a bug, but don't worry, we'll handle it.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions