diff options
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r-- | src/mongo/db/pipeline/expression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp index defc38d8c12..e8c121c2b04 100644 --- a/src/mongo/db/pipeline/expression.cpp +++ b/src/mongo/db/pipeline/expression.cpp @@ -422,7 +422,7 @@ namespace { if (haveDate) { if (totalType == NumberDouble) longTotal = static_cast<long long>(doubleTotal); - return Value(Date_t(longTotal)); + return Value(Date_t::fromMillisSinceEpoch(longTotal)); } else if (totalType == NumberLong) { return Value(longTotal); @@ -2548,7 +2548,7 @@ namespace { } else if (rhs.numeric()) { long long millisSinceEpoch = lhs.getDate() - rhs.coerceToLong(); - return Value(Date_t(millisSinceEpoch)); + return Value(Date_t::fromMillisSinceEpoch(millisSinceEpoch)); } else { uasserted(16613, str::stream() << "cant $subtract a " |