-
How can i set the TIME_ZONE ? the default TIME_ZONE is UTC +00:00, I wan to set +08:00 log below: 2023-09-04T09:45:54.547142Z INFO sqlx::query: summary="SET sql_mode=(SELECT CONCAT(@@sql_mode, ',PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION')),time_zone='+00:00',NAMES …" db.statement="\n\nSET\n sql_mode =(\n SELECT\n CONCAT(\n @ @sql_mode,\n ',PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION'\n )\n ),\n time_zone = '+00:00',\n NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;\n" rows_affected=0 rows_returned=0 elapsed=1.3962ms |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Seems like you are using MySQL. It's not possible to indicate the timezone over the protocol. It is a limitation of MySQL itself. |
Beta Was this translation helpful? Give feedback.
Seems like you are using MySQL. It's not possible to indicate the timezone over the protocol. It is a limitation of MySQL itself.
You can only set the timezone for a table, or a specific column.
It's very intricate, I'd suggest you to always use Local (Timestamp?) or UTC (Datetime?) across the entire MySQL instance.