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 2bf0668e
authored
Feb 25, 2013
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first attempt at converting all dates to utc
1 parent
c15977e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
lib/utils.js
spec/dao-factory.spec.js
lib/utils.js
View file @
2bf0668
...
@@ -165,6 +165,14 @@ var Utils = module.exports = {
...
@@ -165,6 +165,14 @@ var Utils = module.exports = {
}
}
},
},
firstValueOfHash
:
function
(
obj
)
{
for
(
var
key
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
key
))
return
obj
[
key
]
}
return
null
},
inherit
:
function
(
subClass
,
superClass
)
{
inherit
:
function
(
subClass
,
superClass
)
{
if
(
superClass
.
constructor
==
Function
)
{
if
(
superClass
.
constructor
==
Function
)
{
// Normal Inheritance
// Normal Inheritance
...
...
spec/dao-factory.spec.js
View file @
2bf0668
...
@@ -352,7 +352,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
...
@@ -352,7 +352,7 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
})
})
})
})
;(
dialect
.
match
(
/^postgres/
)
?
itEventually
:
it
)
(
'stores the current date in createdAt'
,
function
(
done
)
{
it
(
'stores the current date in createdAt'
,
function
(
done
)
{
this
.
User
.
create
({
username
:
'foo'
}).
success
(
function
(
user
)
{
this
.
User
.
create
({
username
:
'foo'
}).
success
(
function
(
user
)
{
expect
(
parseInt
(
+
user
.
createdAt
/
5000
)).
toEqual
(
parseInt
(
+
new
Date
()
/
5000
))
expect
(
parseInt
(
+
user
.
createdAt
/
5000
)).
toEqual
(
parseInt
(
+
new
Date
()
/
5000
))
done
()
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