summaryrefslogtreecommitdiff
path: root/src/mongo/util/time_support.h
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2017-06-07 10:04:01 -0400
committerTed Tuckman <ted.tuckman@mongodb.com>2017-06-07 10:21:15 -0400
commitcce6177e2b69a83ba94eab29084ce119197f2cb0 (patch)
tree8a7a8812ffb77af8c47a68d2a6837ef4447871fe /src/mongo/util/time_support.h
parent50fedc523a9b55714d58617ca290d3cef3560dd6 (diff)
downloadmongo-cce6177e2b69a83ba94eab29084ce119197f2cb0.tar.gz
SERVER-29360 Add operator<< to Date_t class
Diffstat (limited to 'src/mongo/util/time_support.h')
-rw-r--r--src/mongo/util/time_support.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/util/time_support.h b/src/mongo/util/time_support.h
index 203001e58fa..d9c1821dd3f 100644
--- a/src/mongo/util/time_support.h
+++ b/src/mongo/util/time_support.h
@@ -219,6 +219,11 @@ public:
return !(*this < other);
}
+ friend std::ostream& operator<<(std::ostream& out, const Date_t& date) {
+ out << date.toString();
+ return out;
+ }
+
private:
constexpr explicit Date_t(long long m) : millis(m) {}