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

timezone bug #1543

Open
nuanxinqing123 opened this issue Jan 12, 2024 · 0 comments
Open

timezone bug #1543

nuanxinqing123 opened this issue Jan 12, 2024 · 0 comments

Comments

@nuanxinqing123
Copy link

Describe the bug
When I set the time zone to the above, I got +16, which caused an error in MySQL

To Reproduce
'timezone': 'America/Los_Angeles'

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Traceback (most recent call last):
File "/venv/lib/python3.11/site-packages/tortoise/backends/mysql/client.py", line 129, in create_connection
await cursor.execute(f"SET SESSION time_zone='{tz}';")
File "asyncmy/cursors.pyx", line 179, in execute
File "asyncmy/cursors.pyx", line 364, in _query
File "asyncmy/connection.pyx", line 494, in query
File "asyncmy/connection.pyx", line 682, in _read_query_result
File "asyncmy/connection.pyx", line 1069, in read
File "asyncmy/connection.pyx", line 644, in read_packet
File "asyncmy/protocol.pyx", line 190, in asyncmy.protocol.MysqlPacket.raise_for_error
File "asyncmy/protocol.pyx", line 194, in asyncmy.protocol.MysqlPacket.raise_for_error
File "asyncmy/errors.pyx", line 128, in asyncmy.errors.raise_mysql_exception
File "asyncmy/errors.pyx", line 137, in asyncmy.errors.raise_mysql_exception
asyncmy.errors.OperationalError: (1298, "Unknown or incorrect time zone: '+16:00'")

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