diff options
author | Ted Tuckman <ted.tuckman@mongodb.com> | 2021-10-05 13:41:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-05 15:01:05 +0000 |
commit | d6790e0ebc3a484a83e107536940d11780460d6f (patch) | |
tree | e1268533300eef19ed7228ffbaaba3f27d0035f6 /jstests/aggregation/sources/densify/libs/densify_in_js.js | |
parent | 0d18dab404e4649c054666e5787000154c7e42c0 (diff) | |
download | mongo-d6790e0ebc3a484a83e107536940d11780460d6f.tar.gz |
SERVER-52290 Remove featureFlagDensify
Diffstat (limited to 'jstests/aggregation/sources/densify/libs/densify_in_js.js')
-rw-r--r-- | jstests/aggregation/sources/densify/libs/densify_in_js.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/aggregation/sources/densify/libs/densify_in_js.js b/jstests/aggregation/sources/densify/libs/densify_in_js.js index 48b63298499..4c92bd572bc 100644 --- a/jstests/aggregation/sources/densify/libs/densify_in_js.js +++ b/jstests/aggregation/sources/densify/libs/densify_in_js.js @@ -13,18 +13,18 @@ load("jstests/aggregation/extras/utils.js"); // arrayEq */ const makeArithmeticHelpers = (unitName, factor) => { const getter = date => { - const newDate = new Date(date); + const newDate = new ISODate(date.toISOString()); // Calling the proper function on the passed in date object. If the unitName was "Seconds" // would be equivalent to `newDate.getSeconds()`. - return newDate["get" + unitName](); + return newDate["getUTC" + unitName](); }; // Return a new date with the proper unit adjusted with the second parameter. // Dates and the setter helpers are generally mutable, but this function will make sure // the arithmetic helpers won't mutate their inputs. const setter = (date, newComponent) => { - const newDate = new Date(date); - newDate["set" + unitName](newComponent); + const newDate = new ISODate(date.toISOString()); + newDate["setUTC" + unitName](newComponent); return newDate; }; |