I wanted to ask, can anyone point me to any example of using 'time' as an attribute of a model? It's possible according to documentation http://sailsjs.org/#!documentation/models , but I can't find any examples, and I'd like to know what type is it representing, cause I don't know 'time' type in javascript.
Asked
Active
Viewed 3,379 times
2 Answers
4
time
is deprecated and should not be used in new Sails projects. It was an alias for date
and dateTime
, which are still valid. We'll go ahead and remove time
from the documentation, thanks for pointing it out!

sgress454
- 24,870
- 4
- 74
- 92
1
If you are using sails-mongo you most likely want 'datetime'
type. Which will look like ISODate("2014-04-03T07:00:00Z")
in your mongo database.
...And of course a Date() object of the JS end.
hope that helps.

InternalFX
- 1,475
- 12
- 14
-
1How to store a time value in a `DateTime` attribute? I mean no to pass the whole format value `("2014-04-03T07:00:00Z")` in the request, just send something like `("07:18:22")`. – alexventuraio Dec 16 '15 at 17:46