octoblu / meshblu

Meshblu is a cross-protocol IoT machine-to-machine messaging system.
https://meshblu.readme.io/
MIT License
815 stars 182 forks source link

timestamp stored as int not ISODate #20

Closed bassdread closed 10 years ago

bassdread commented 10 years ago

Mongo uses a ISODate type to allow date range searches, see http://cookbook.mongodb.org/patterns/date_range/

Currently "timestamp" is stored as an int making the standard Mongo date range query impossible.

Change or add a new field to save the timestamp as a native Mongo datetime field.

"timestamp" : ISODate("2014-03-14T11:07:52.830Z")
octoblu commented 10 years ago

Timestamp is now logging as ISODate. Thanks!