In couchbase : “eventTime”: “2022-04-14T19:40:00-07:00”,
From .net 3.2 SDK : “eventTime”:“2022-04-14T18:40:00-04:00”
Please check attached images. For same data in couchbase , getting differebt results from .net SDK2.7 and SDK3.2.8
Right side is with SDK 3.2 and left side with SDK 2.7
IBucketContext bucketContext = new BucketContext(await _getBucket());
Above code data returned in orderRequest and then filtered using following code orderEventData = orderRequest?.Where(oe => oe.PE == partner.Id
&& oe.References != null && oe.References.Any(x => x == shipmentReference))
?.OrderByDescending(e => e.DateCreated)
Only if we try collection.GetAsync(documentId) its returning correct data. Even tried using N1QL quey but got same result as wrong datetime
Just want to let you know a support ticket has been opened on this issue and the SDK team is investigating this.
There are couple of things that may help with the diagnosis, if you have them (assuming you haven’t already given them to the SDK team):
- Can you show how you’re configuring your ClusterOptions?
- Can you confirm the version of Linq2Couchbase you are using?
- Can you provide the definition of the POCOs for Order and it’s children?
I believe we have narrowed down this problem to a quirk in the Newtonsoft.Json deserializer that only affects the streaming deserializer we use for queries. We are working on a fix.
There seems to be a workaround available in the meantime. You can configure a custom instance of
DefaultSerializer with custom options, and set
DateTimeOffset. Alternatively, though somewhat more involved, you could switch to System.Text.Json serialization.
Here is the issue you can follow: https://issues.couchbase.com/browse/NCBC-3195
Thanks @btburnett3 , as per ticket its scheduled for 3.3.2. Current nuget version is 3.2.9 , by when can expect 3.3.2 available?
I tried with custom instance of
DefaultSerializer with custom options but did not worked so will wait for SDK next version.
3.3.2 will be the next release, I’m assuming in the next few weeks but someone on the SDK team should be able to speak better to the current release cycle.
Can you give me the code you tried for a custom deserializer?
3.3.1 will be released today; 3.3.2 is scheduled for the first Tuesday in June. Generally, we always release the first Tuesday of every month.