<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:13 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>[JAVA-2439] MongoCursor returns the date variable as integer value</title>
                <link>https://jira.mongodb.org/browse/JAVA-2439</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;While Querying using MongoCursor the date field returned as integer variable. But when i use dbobject it seems to be return as perfect.&lt;/p&gt;

&lt;p&gt;MongoDB:&lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;148546_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/148546/148546_Capture.PNG&quot; title=&quot;Capture.PNG&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;148546&quot; file-preview-title=&quot;Capture.PNG&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/148546/_thumb_148546.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;When I query using the MongoCursor&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; : { &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;$date&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;1468476847025&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; }}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;When I query using the DBCursor&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; : { &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;$date&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;2016-07-23T15:02:12.728Z&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; }}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The method getDB(String) from the type Mongo is deprecated&lt;/p&gt;</description>
                <environment></environment>
        <key id="350501">JAVA-2439</key>
            <summary>MongoCursor returns the date variable as integer value</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="13202">Works as Designed</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="vinothkumarsubbu">Vinoth Kumar</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jan 2017 13:21:26 +0000</created>
                <updated>Fri, 27 Oct 2023 13:21:14 +0000</updated>
                            <resolved>Tue, 28 Feb 2017 15:54:39 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1511304" author="ross@10gen.com" created="Tue, 28 Feb 2017 15:54:39 +0000"  >&lt;p&gt;We don&apos;t have a tentative release date yet, however the next release is scheduled for this quarter.&lt;/p&gt;

&lt;p&gt;I&apos;m marking this ticket as works as designed only because the current format for the date mirrored the Json emitted by earlier versions of MongoDB tools.  As mentioned in a similar ticket (&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2454&quot; title=&quot;Document.toJson incorrectly serializes Date&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2454&quot;&gt;&lt;del&gt;JAVA-2454&lt;/del&gt;&lt;/a&gt;) there is some inconsistency between different MongoDB versions, tools and the outputted extended Json. All tools should be able to consume the older Json data formats but they may generate newer formats.&lt;/p&gt;

&lt;p&gt;Its because of this the drivers team has been working on examining and specifying the extended Json format. Please see &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2447&quot; title=&quot;Implement Extended JSON specification&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2447&quot;&gt;&lt;del&gt;JAVA-2447&lt;/del&gt;&lt;/a&gt;, for the specification information and that ticket will cover this work.  As mentioned previously &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1772&quot; title=&quot;Make it easier to change JsonWriter&#160;behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1772&quot;&gt;&lt;del&gt;JAVA-1772&lt;/del&gt;&lt;/a&gt; is the initial steps for easier customisation and is already in master.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1497524" author="vinothkumarsubbu" created="Mon, 13 Feb 2017 05:56:23 +0000"  >&lt;p&gt;HI Ross&lt;br/&gt;
Thanks for the clarification.&lt;br/&gt;
Let me know is there any tentative release date for 3.5.0.&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Vinoth &lt;/p&gt;</comment>
                            <comment id="1488950" author="ross@10gen.com" created="Tue, 31 Jan 2017 14:13:30 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vinothkumarsubbu&quot; class=&quot;user-hover&quot; rel=&quot;vinothkumarsubbu&quot;&gt;vinothkumarsubbu&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for the ticket. You are correct that the &lt;tt&gt;Document#toJson&lt;/tt&gt; method defaults to returning dates in the following format: &lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&quot;date&quot; : { &quot;$date&quot; : &amp;lt;date as milliseconds&amp;gt; }}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;This supports all dates including pre-epoch dates. In the next release (3.5.0) we are making it easier to customise how bson types are represented in Json - see &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1772&quot; title=&quot;Make it easier to change JsonWriter&#160;behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1772&quot;&gt;&lt;del&gt;JAVA-1772&lt;/del&gt;&lt;/a&gt;.  This code is already available for testing as a snapshot from &lt;a href=&quot;https://oss.sonatype.org/content/repositories/snapshots/org/mongodb/mongo-java-driver/3.5.0-SNAPSHOT/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sonatype&lt;/a&gt;. It should be noted that snapshots are only recommended for testing purposes.&lt;/p&gt;

&lt;p&gt;I hope that clarifies the situation.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="353464">JAVA-2447</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="148546" name="Capture.PNG" size="1656" author="vinothkumarsubbu" created="Tue, 31 Jan 2017 13:19:10 +0000"/>
                    </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|hsugi7:</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>