Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ab5233e6
authored
Sep 08, 2016
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
restored sails-mysql files for milliseconds support
parent
c751ca44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
sails/src/node_modules/sails-mysql/lib/sql.js
sails/src/node_modules/sails-mysql/lib/utils.js
sails/src/node_modules/sails-mysql/lib/sql.js
View file @
ab5233e6
...
...
@@ -468,7 +468,7 @@ function sqlTypeCast(attr) {
break
;
case
'datetime'
:
expandedType
=
'DATETIME'
;
expandedType
=
'DATETIME
(3)
'
;
break
;
case
'time'
:
...
...
@@ -499,7 +499,8 @@ function toSqlDate(date) {
(
'00'
+
date
.
getDate
()).
slice
(
-
2
)
+
' '
+
(
'00'
+
date
.
getHours
()).
slice
(
-
2
)
+
':'
+
(
'00'
+
date
.
getMinutes
()).
slice
(
-
2
)
+
':'
+
(
'00'
+
date
.
getSeconds
()).
slice
(
-
2
);
(
'00'
+
date
.
getSeconds
()).
slice
(
-
2
)
+
'.'
+
(
'00'
+
date
.
getMilliseconds
()).
slice
(
-
3
);
return
date
;
}
...
...
sails/src/node_modules/sails-mysql/lib/utils.js
View file @
ab5233e6
...
...
@@ -242,7 +242,8 @@ utils.toSqlDate = function toSqlDate(date) {
(
'00'
+
date
.
getDate
()).
slice
(
-
2
)
+
' '
+
(
'00'
+
date
.
getHours
()).
slice
(
-
2
)
+
':'
+
(
'00'
+
date
.
getMinutes
()).
slice
(
-
2
)
+
':'
+
(
'00'
+
date
.
getSeconds
()).
slice
(
-
2
);
(
'00'
+
date
.
getSeconds
()).
slice
(
-
2
)
+
'.'
+
(
'00'
+
date
.
getMilliseconds
()).
slice
(
-
2
);
return
date
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment