Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 13b862f2
authored
Feb 25, 2013
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specify timezone option instead of typecaster
1 parent
721eef26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
lib/dialects/mysql/connector-manager.js
lib/dialects/mysql/query.js
lib/dialects/mysql/connector-manager.js
View file @
13b862f
...
...
@@ -241,7 +241,8 @@ module.exports = (function() {
port
:
config
.
port
,
user
:
config
.
username
,
password
:
config
.
password
,
database
:
config
.
database
database
:
config
.
database
,
timezone
:
'Z'
})
connection
.
query
(
"SET time_zone = '+0:00'"
);
// client.setMaxListeners(self.maxConcurrentQueries)
...
...
lib/dialects/mysql/query.js
View file @
13b862f
...
...
@@ -23,21 +23,13 @@ module.exports = (function() {
this
.
options
.
logging
(
'Executing: '
+
this
.
sql
)
}
this
.
client
.
query
({
sql
:
this
.
sql
,
typeCast
:
function
(
field
,
next
)
{
if
(
field
.
type
==
'DATETIME'
)
{
return
new
Date
(
field
.
string
()
+
'Z'
)
}
return
next
();
}
},
function
(
err
,
results
,
fields
)
{
this
.
client
.
query
(
this
.
sql
,
function
(
err
,
results
,
fields
)
{
this
.
emit
(
'sql'
,
this
.
sql
)
if
(
err
)
{
this
.
emit
(
'error'
,
err
,
this
.
callee
)
}
else
{
this
.
emit
(
'success'
,
this
.
formatResults
(
results
,
fields
))
this
.
emit
(
'success'
,
this
.
formatResults
(
results
))
}
}.
bind
(
this
)).
setMaxListeners
(
100
)
return
this
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment