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 ba5e688e
authored
Sep 29, 2014
by
Joel Trost
Committed by
Matt Broadstone
Dec 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Passes timezone test
1 parent
a2a21aae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
lib/dialects/mssql/data-types.js
test/timezone.test.js
lib/dialects/mssql/data-types.js
View file @
ba5e688
...
@@ -3,5 +3,7 @@ var DataTypes = require('../../data-types');
...
@@ -3,5 +3,7 @@ var DataTypes = require('../../data-types');
//drop table Group
//drop table Group
DataTypes
.
BOOLEAN
=
'BIT'
;
DataTypes
.
BOOLEAN
=
'BIT'
;
DataTypes
.
DATE
=
'DATETIME2'
;
DataTypes
.
DATE
=
'DATETIME2'
;
DataTypes
.
NOW
=
'GETDATE()'
;
DataTypes
.
UUID
=
'UNIQUEIDENTIFIER'
;
module
.
exports
=
DataTypes
;
module
.
exports
=
DataTypes
;
\ No newline at end of file
test/timezone.test.js
View file @
ba5e688
...
@@ -19,10 +19,14 @@ if (dialect !== 'sqlite') {
...
@@ -19,10 +19,14 @@ if (dialect !== 'sqlite') {
});
});
it
(
'returns the same value for current timestamp'
,
function
()
{
it
(
'returns the same value for current timestamp'
,
function
()
{
var
now
=
'now()'
;
var
now
=
'now()'
var
query
=
"SELECT "
+
now
+
" as now"
;
,
startQueryTime
=
Date
.
now
();
var
startQueryTime
=
Date
.
now
();
if
(
dialect
===
'mssql'
){
now
=
'GETDATE()'
;
}
var
query
=
"SELECT "
+
now
+
" as now"
;
return
Promise
.
all
([
return
Promise
.
all
([
this
.
sequelize
.
query
(
query
),
this
.
sequelize
.
query
(
query
),
this
.
sequelizeWithTimezone
.
query
(
query
)
this
.
sequelizeWithTimezone
.
query
(
query
)
...
...
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