<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:02:14 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-1336] Find with date</title>
                <link>https://jira.mongodb.org/browse/CXX-1336</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Hi! Is it possible to create query that uses mongo-server-side date? For example find &lt;br/&gt;
{&quot;date&quot;: &lt;/p&gt;
{&quot;$gt&quot;: CURRENT_DATE - 5 minutes }
&lt;p&gt;}&lt;/p&gt;</description>
                <environment></environment>
        <key id="382205">CXX-1336</key>
            <summary>Find with date</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="denbip">Denis Bip</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 May 2017 13:41:17 +0000</created>
                <updated>Wed, 11 Sep 2019 19:06:46 +0000</updated>
                            <resolved>Wed, 10 May 2017 12:33:13 +0000</resolved>
                                                                    <component>Documentation</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1568294" author="david.golden" created="Wed, 10 May 2017 12:32:59 +0000"  >&lt;p&gt;Hmm.  This sounds like an &quot;XY Problem&quot;.&lt;/p&gt;

&lt;p&gt;You can find out the server&apos;s localtime via the &lt;tt&gt;ismaster&lt;/tt&gt; command.  However, I&apos;m concerned that whatever use you have in mind is likely to lead to a problem. The server&apos;s clock is no more reliable than the client&apos;s clock and may be less so in way, as primary failover will give a different server with a completely different clock. &lt;/p&gt;

&lt;p&gt;I&apos;m going to close this ticket, and I encourage you to discuss your use case on the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user&lt;/a&gt; list for broader feedback from MongoDB engineers and the community.&lt;/p&gt;</comment>
                            <comment id="1568198" author="denbip" created="Wed, 10 May 2017 07:30:08 +0000"  >&lt;p&gt;That uses client-side clock, not server-side. That may be different. For example: server time 2017-02-10 00:00:00, client time 2017-02-10 00:02:00...If I run somthing like &lt;/p&gt;
{&quot;$gt&quot;: CURRENT_TIME - 1 min}
&lt;p&gt; then I get &lt;/p&gt;
{&quot;$gt&quot;: &quot;2017-02-10 00:01:00&quot;}
&lt;p&gt;, but that not what I want - &lt;/p&gt;
{&quot;$gt&quot;: &quot;2017-02-09 29:59:00&quot;}
&lt;p&gt;. &lt;/p&gt;

&lt;p&gt;If it is not possible, how to &quot;find&quot; server side current_date?&lt;/p&gt;</comment>
                            <comment id="1567965" author="david.golden" created="Tue, 9 May 2017 20:41:59 +0000"  >&lt;p&gt;Hi, Denis.&lt;/p&gt;

&lt;p&gt;You can query dates with the &lt;a href=&quot;https://mongodb.github.io/mongo-cxx-driver/api/current/structbsoncxx_1_1types_1_1b__date.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;bsoncxx::types::b_date&lt;/tt&gt;&lt;/a&gt; type.  You might want to see one of our test files for examples working with &lt;tt&gt;system_clock::now()&lt;/tt&gt;.  Please look at &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/blob/releases/stable/src/bsoncxx/test/bson_b_date.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;src/bsoncxx/test/bson_b_date.cpp&lt;/a&gt; and let me know if that gives you enough information to work with.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hszdsv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>