Skip to content

Commit 3669bcb

Browse files
committed
Update README to mention timezone in the connection options
1 parent 615f1bb commit 3669bcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ When establishing a connection, you can set the following options:
139139
* `password`: The password of that MySQL user.
140140
* `database`: Name of the database to use for this connection (Optional).
141141
* `charset`: The charset for the connection. (Default: `'UTF8_GENERAL_CI'`)
142+
* `timezone`: The timezone used to store local dates. (Default: `'local'`)
142143
* `insecureAuth`: Allow connecting to MySQL instances that ask for the old
143144
(insecure) authentication method. (Default: `false`)
144145
* `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
151152
string. For example:
152153

153154
```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');
155156
```
156157

157158
Note: The query values are first attempted to be parsed as JSON, and if that

0 commit comments

Comments
 (0)