This features adds a new Aggregation Framework operator $dateFromString.
It has the following syntax:
The dateString could be anything like:
- August 4, 2017 17:10:27.812+0100
The "timezone" argument is optional, and can either specify an Olson Timezone Identifier such as "Europe/London" or "America/New_York", or, it can be a UTC offset in the forms: "+03", "-0530", and "+04:45". If you specify a timezone argument it means that the dateString that you provided will be interpreted as it was in that time zone.
Would mean 17:06 local time in London, or 16:06 in UTC (as London right now is at UTC+1).
It is not allowed to specify a time zone through the dateString (such as the ending "Z" or "+0400") and also specify a time zone through the timezone argument. In that case, an exception is thrown.