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 d9aa39ab
authored
Feb 02, 2015
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3044 from seegno-forks/support/update-moment-2-9-0
Update moment@2.9.0
2 parents
edb18238
f7f4ebb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
lib/sql-string.js
package.json
test/integration/model/findAll.test.js
lib/sql-string.js
View file @
d9aa39a
...
...
@@ -170,7 +170,7 @@ SqlString.formatNamedParameters = function(sql, values, timeZone, dialect) {
};
SqlString
.
dateToString
=
function
(
date
,
timeZone
,
dialect
)
{
date
=
moment
(
date
).
zone
(
timeZone
);
date
=
moment
(
date
).
utcOffset
(
timeZone
);
if
(
dialect
===
'mysql'
||
dialect
===
'mariadb'
)
{
return
date
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
...
...
package.json
View file @
d9aa39a
...
...
@@ -37,7 +37,7 @@
"generic-pool"
:
"2.1.1"
,
"inflection"
:
"1.5.3"
,
"lodash"
:
"~2.4.0"
,
"moment"
:
"
~2.8
.0"
,
"moment"
:
"
^2.9
.0"
,
"node-uuid"
:
"~1.4.1"
,
"toposort-class"
:
"~0.3.0"
,
"validator"
:
"~3.22.1"
...
...
test/integration/model/findAll.test.js
View file @
d9aa39a
...
...
@@ -1300,7 +1300,7 @@ describe(Support.getTestDialectTeaser('Model'), function() {
it
(
'sorts the results via a date column'
,
function
(
done
)
{
var
self
=
this
;
self
.
User
.
create
({
username
:
'user3'
,
data
:
'bar'
,
theDate
:
moment
().
add
(
'hours'
,
2
).
toDate
()}).
success
(
function
()
{
self
.
User
.
create
({
username
:
'user3'
,
data
:
'bar'
,
theDate
:
moment
().
add
(
2
,
'hours'
).
toDate
()}).
success
(
function
()
{
self
.
User
.
findAll
({
order
:
[[
'theDate'
,
'DESC'
]]
}).
success
(
function
(
users
)
{
expect
(
users
[
0
].
id
).
to
.
be
.
above
(
users
[
2
].
id
);
done
();
...
...
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