jstests/aggregation/expressions/date_expressions_with_timezones.js
// its parts in a timezone-aware fashion. Returns the resulting document containing the date parts.
its parts in a timezone-aware fashion. Returns the resulting document containing the date parts.
its parts in a timezone - aware fashion . Returns the resulting document containing the date parts .
function runDateToPartsExpression(inputDate, timezone) {
    const results =
        coll.aggregate(
                [{$project: {_id: 0, out: {$dateToParts: {date: inputDate, timezone: timezone}}}}])
            .toArray();
    assert.eq(results.length, 1, results);
    return results[0].out;
}
function runDateToPartsExpression ( inputDate , timezone ) { const results = coll . aggregate ( [ { $project : { _id : 0 , out : { $dateToParts : { date : inputDate , timezone : timezone } } } } ] ) . toArray ( ) ; assert . eq ( results . length , 1 , results ) ; return results [ 0 ] . out ; }
its parts in a timezone-aware fashion.
its parts in a timezone - aware fashion .