Aqua Data Studio 15.0.0-dev-256
Build #: 37570
Built on: 2014-Apr-28 05:22:50 PM.
Mong DB : 2.6.
|
63 KB
|
43 KB
I get the correct value of 1. Please see the attached screenshot Issue11969.png.
In your case, there may be a time zone issue. The "time" value for dtcolumns may have caused the day to be shifted by one day. You should verify the time zone used in your test case.
Do you also get 365 when you use MongoDB shell? Both ADS MongoShell and MongoDB shell should return the same value.
I get the correct value of 1. Please see the attached screenshot Issue11969.png.
In your case, there may be a time zone issue. The "time" value for dtcolumns may have caused the day to be shifted by one day. You should verify the time zone used in your test case.
Do you also get 365 when you use MongoDB shell? Both ADS MongoShell and MongoDB shell should return the same value.
I have executed these two scripts in query analyzer.
INSERT INTO "dttable"("dtcolumns") VALUES (ISODATE('2014-01-01T04:42:15Z'))
GO
INSERT INTO "dttable"("dtcolumns") VALUES (DATE('2014-01-01'))
GO
Now with first statement I'm setting default time zone and ADS is returning correct result, but with second statement i'm not inserting time zone and its returning me wrong answer.
Now go to "dttable", right click on it and select Script Object to window as Insert and check default time zone value.
For second statement we have not set any timezone and ADS set a default value, when we checked time zone value for second statement in shell it returned me some different values then my current timezone value.
Why these timezone values are different, for first statement ADS is giving correct time zone but for second its setting wrong time zone. Have a look at attached screen shot.
I have executed these two scripts in query analyzer.
INSERT INTO "dttable"("dtcolumns") VALUES (ISODATE('2014-01-01T04:42:15Z'))
GO
INSERT INTO "dttable"("dtcolumns") VALUES (DATE('2014-01-01'))
GO
Now with first statement I'm setting default time zone and ADS is returning correct result, but with second statement i'm not inserting time zone and its returning me wrong answer.
Now go to "dttable", right click on it and select Script Object to window as Insert and check default time zone value.
For second statement we have not set any timezone and ADS set a default value, when we checked time zone value for second statement in shell it returned me some different values then my current timezone value.
Why these timezone values are different, for first statement ADS is giving correct time zone but for second its setting wrong time zone. Have a look at attached screen shot.
ISODATE('2014-01-01T04:42:15Z')) actually uses the GMT time zone.
DATE('2014-01-01')) uses your default time zone.
ISODATE('2014-01-01T04:42:15Z')) actually uses the GMT time zone.
DATE('2014-01-01')) uses your default time zone.
Closing the issue. We will revisit if a customer complaints on the date for MongoDB on this scenario.
Closing the issue. We will revisit if a customer complaints on the date for MongoDB on this scenario.
Issue #11969 |
Closed |
Invalid |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
Earlier version of MongoDB (2.4.10) also returns the same value.