Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set timezone #134

Open
plumk97 opened this issue Mar 10, 2024 · 0 comments
Open

How to set timezone #134

plumk97 opened this issue Mar 10, 2024 · 0 comments

Comments

@plumk97
Copy link

plumk97 commented Mar 10, 2024

My database is in Japan and Motor Admin also deployed in Japan server

But the time in the returned data is in the zero timezone

This causes the time zone displayed by my browser to be 9 hours ahead

I set some common timezone parameters for DSN url such as timezone=+09:00 and serverTimezone=+09:00 but they don't work

The result of run select now():

{
    "data": [
        [
            "2024-03-10T10:17:51.000Z"
        ]
    ],
    "meta": {
        "columns": [
            {
                "name": "now()",
                "display_name": "Now()",
                "column_type": "datetime",
                "is_array": false
            }
        ]
    }
}

The result of run select @@global.time_zone, @@session.time_zone:

{
    "data": [
        [
            "+09:00",
            "+09:00"
        ]
    ],
    "meta": {
        "columns": [
            {
                "name": "@@global.time_zone",
                "display_name": "@@global.time zone",
                "column_type": "string",
                "is_array": false
            },
            {
                "name": "@@session.time_zone",
                "display_name": "@@session.time zone",
                "column_type": "string",
                "is_array": false
            }
        ]
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant