Created
April 5, 2013 21:31
-
-
Save riywo/5322782 to your computer and use it in GitHub Desktop.
a way of mongo Timestamp pretty printing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> db.foo.findOne().t | |
Timestamp(1365195372000, 1) | |
> Timestamp.prototype.toString = function() { return new Date(this.getTime()); } | |
> db.foo.findOne().t | |
Fri Apr 05 2013 13:56:12 GMT-0700 (PDT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment