不要怂,就是干,撸起袖子干!

Commit ba5e688e by Joel Trost Committed by Matt Broadstone

Passes timezone test

1 parent a2a21aae
......@@ -3,5 +3,7 @@ var DataTypes = require('../../data-types');
//drop table Group
DataTypes.BOOLEAN = 'BIT';
DataTypes.DATE = 'DATETIME2';
DataTypes.NOW = 'GETDATE()';
DataTypes.UUID = 'UNIQUEIDENTIFIER';
module.exports = DataTypes;
\ No newline at end of file
......@@ -19,10 +19,14 @@ if (dialect !== 'sqlite') {
});
it('returns the same value for current timestamp', function () {
var now = 'now()';
var query = "SELECT " + now + " as now";
var startQueryTime = Date.now();
var now = 'now()'
, startQueryTime = Date.now();
if(dialect === 'mssql'){
now = 'GETDATE()';
}
var query = "SELECT " + now + " as now";
return Promise.all([
this.sequelize.query(query),
this.sequelizeWithTimezone.query(query)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!