File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ When establishing a connection, you can set the following options:
139
139
* ` password ` : The password of that MySQL user.
140
140
* ` database ` : Name of the database to use for this connection (Optional).
141
141
* ` charset ` : The charset for the connection. (Default: ` 'UTF8_GENERAL_CI' ` )
142
+ * ` timezone ` : The timezone used to store local dates. (Default: ` 'local' ` )
142
143
* ` insecureAuth ` : Allow connecting to MySQL instances that ask for the old
143
144
(insecure) authentication method. (Default: ` false ` )
144
145
* ` typeCast ` : Determines if column values should be converted to native
@@ -151,7 +152,7 @@ In addition to passing these options as an object, you can also use a url
151
152
string. For example:
152
153
153
154
``` js
154
- var connection = mysql .createConnection (' mysql://user:pass@host/db?debug=true&charset=BIG5_CHINESE_CI' );
155
+ var connection = mysql .createConnection (' mysql://user:pass@host/db?debug=true&charset=BIG5_CHINESE_CI&timezone=-0700 ' );
155
156
```
156
157
157
158
Note: The query values are first attempted to be parsed as JSON, and if that
You can’t perform that action at this time.
0 commit comments