<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:51 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>[SERVER-2064] $sysdate for inserts/updates</title>
                <link>https://jira.mongodb.org/browse/SERVER-2064</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I would like to ask for the following feature:&lt;/p&gt;

&lt;p&gt;on inserts/updates I would like to have a &quot;placeholder&quot; like &quot;$sysdate&quot; as argument, telling the database engine to replace the &quot;$sysdate-placeholder&quot; by the current database UTC before putting it in the internal mongodb queue.&lt;/p&gt;

&lt;p&gt;e.g.: db.coll.insert(&lt;/p&gt;
{&quot;tx&quot;:&quot;test string&quot;,&quot;timestamp&quot;:$sysdate}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;The advantage would be that one can be sure that sorting by the timestamp of the document field results in the 100% sortorder of insertion; if I insert data from different machines, I have no guarantee about the insertion sortorder in the internal queue of MongoDB for persisting ( depending on the application delay for &quot;getting the data and pushing it to mongodb&quot; ).&lt;/p&gt;

&lt;p&gt;Thank you for taking this into consideration,&#180;&lt;/p&gt;


</description>
                <environment>all</environment>
        <key id="13628">SERVER-2064</key>
            <summary>$sysdate for inserts/updates</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="chr1st0ph">Christoph Preissner</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Nov 2010 08:30:41 +0000</created>
                <updated>Wed, 17 Jan 2018 18:15:28 +0000</updated>
                            <resolved>Fri, 26 Feb 2016 19:50:58 +0000</resolved>
                                                                    <component>Usability</component>
                                        <votes>4</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1186291" author="david.storch" created="Fri, 26 Feb 2016 19:50:58 +0000"  >&lt;p&gt;Closing as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13695&quot; title=&quot;Support $currentDate expression for insert&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13695&quot;&gt;SERVER-13695&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="750554" author="akostadinov" created="Tue, 28 Oct 2014 16:38:50 +0000"  >&lt;p&gt;It would be very useful if arithmetic operations are possible with current date. For example if resource reservation is implemented and one is doing findAndModify atomic operation on that resource, it would be very useful to be able to set document&apos;s `reserved_until` field to `$now+##units`.&lt;br/&gt;
The thing is that sometimes clients can&apos;t be controlled and kept in time sync with each other. To  avoid any troubles server time should be used.&lt;/p&gt;</comment>
                            <comment id="710649" author="abhishekguha.thakurta@bms.com" created="Wed, 3 Sep 2014 16:35:40 +0000"  >&lt;p&gt;Hello Fred,&lt;br/&gt;
               A question regarding the dates on the same lines. We intend to pass a JSON expression of the current date to our date-field. Could you help us out with the right way to do this (We do not intend to use new Date() field)&lt;/p&gt;

&lt;p&gt;{ $match : &lt;/p&gt;
{
   &amp;lt;our date field&amp;gt; : &quot;$date:now&quot;
}}</comment>
                            <comment id="28294" author="fredstluka" created="Thu, 7 Apr 2011 21:10:19 +0000"  >&lt;p&gt;This would be a very useful feature.&lt;/p&gt;

&lt;p&gt;Exactly like the sysdate feature of MySQL, Oracle, and others.&lt;/p&gt;

&lt;p&gt;Here&apos;s what we&apos;re doing now:&lt;/p&gt;

&lt;p&gt;We don&apos;t want dates captured in the Web client.  So instead of passing&lt;br/&gt;
&apos;$date:&apos; followed by a client-side millisecond counter, as part of our JSON&lt;br/&gt;
string to the Web server, we pass &apos;$date:now&apos; to the Web server, and our&lt;br/&gt;
code in the Web server replaces &apos;now&apos; with a server-side millisecond &lt;br/&gt;
counter before passing the JSON string to Mongo.  That means all dates&lt;br/&gt;
are captured on the Web server, not in the various Web browsers.&lt;/p&gt;

&lt;p&gt;So far, so good, but we still need a way for the various Web servers to &lt;br/&gt;
pass the responsibility on to the Mongo DB server.  It would be great if&lt;br/&gt;
Mongo would support a $sysdate that would cause it to capture and &lt;br/&gt;
store the current time on the Mongo DB server.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="91556">SERVER-10911</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="132811">SERVER-13695</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 7 Apr 2011 21:10:19 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 50 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 50 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>abhishekguha.thakurta@bms.com</customfieldvalue>
            <customfieldvalue>akostadinov</customfieldvalue>
            <customfieldvalue>chr1st0ph</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>fredstluka</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpbq7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrfziv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6201</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsr6xj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>