boostorg / mysql

MySQL C++ client based on Boost.Asio
https://www.boost.org/doc/libs/master/libs/mysql
Boost Software License 1.0
252 stars 32 forks source link

Document of TIMESTAMP and "SET time_zone = 'UTC'" #170

Closed liubing closed 1 year ago

liubing commented 1 year ago

Quote

// This change has session scope. All operations after this query
// will now use UTC for TIMESTAMPs. Other sessions will not see the change.
// If you need to reconnect the connection, you need to run this again.
conn.execute("SET @time_zone = 'UTC'", result);

I think the @ should be removed as it means user defined variable.

anarthal commented 1 year ago

Good catch. Thanks.