summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-01-31 22:26:17 -0500
committerEliot Horowitz <eliot@10gen.com>2012-01-31 22:26:34 -0500
commite45cb6180280494f97eb5a0a2be32de56bc1644a (patch)
treee06602ba556ade0855e6783edd693a93fc74c0ea
parent7cb8cf6c3459bfda29eeae840aee708ceea22ed5 (diff)
downloadmongo-e45cb6180280494f97eb5a0a2be32de56bc1644a.tar.gz
fix 32-bit agg test and Date_t
-rw-r--r--jstests/aggregation/articles.js2
-rw-r--r--jstests/aggregation/testall.js9
-rw-r--r--src/mongo/bson/util/misc.h2
3 files changed, 8 insertions, 5 deletions
diff --git a/jstests/aggregation/articles.js b/jstests/aggregation/articles.js
index 364b89cb653..595de4e935c 100644
--- a/jstests/aggregation/articles.js
+++ b/jstests/aggregation/articles.js
@@ -20,7 +20,7 @@ db.article.save( {
db.article.save( {
title : "this is your title" ,
author : "dave" ,
- posted : new Date(4121381470000) ,
+ posted : new Date(1912392670000) ,
pageViews : 7 ,
tags : [ "fun" , "nasty" ] ,
comments : [
diff --git a/jstests/aggregation/testall.js b/jstests/aggregation/testall.js
index 05da94ec7ff..45777ae5fa3 100644
--- a/jstests/aggregation/testall.js
+++ b/jstests/aggregation/testall.js
@@ -1103,10 +1103,10 @@ var p19result = [
"hour" : 4,
"dayOfYear" : 220,
"dayOfMonth" : 8,
- "dayOfWeek" : 1,
+ "dayOfWeek" : 5,
"month" : 8,
- "week" : 32,
- "year" : 2100
+ "week" : 31,
+ "year" : 2030
},
{
"_id" : ObjectId("4e14a3f1ffc569a332159c6b"),
@@ -1122,6 +1122,9 @@ var p19result = [
}
];
+printjson( p19.result );
+printjson( p19result );
+
assert(arrayEq(p19.result, p19result), 'p19 failed');
diff --git a/src/mongo/bson/util/misc.h b/src/mongo/bson/util/misc.h
index b547c981bdf..2d2cc7bc441 100644
--- a/src/mongo/bson/util/misc.h
+++ b/src/mongo/bson/util/misc.h
@@ -77,7 +77,7 @@ namespace mongo {
operator unsigned long long&() { return millis; }
operator const unsigned long long&() const { return millis; }
void toTm (tm *buf) {
- time_t dtime = (time_t) millis/1000;
+ time_t dtime = (time_t)(millis/1000);
#if defined(_WIN32)
gmtime_s(buf, &dtime);
#else