-
Notifications
You must be signed in to change notification settings - Fork 22
Description
For example, I have the following data structure (tested with the MongoDB controller):
{
"key1": {
"key2": "... any timestamp ..."
}
}
... and LightBlue returns -5 timezone (default at the server, non-UTC) in find queries by default.
Correct behavior
If I'm updating the item with the following query and UTC time:
{
"objectType": "...",
"version": "...",
"query": {
... select the item above ...
},
"update": {
"$set": {
"key1.key2": "20171214T00:19:40.000-0000"
}
},
"projection": [
{
"field": "key1",
"include": true,
"recursive": true
}
]
}
I'm receiving the time transformed to the -5 timezone (non-UTC, as in the find query) in the projection:
{
"_id": "... any id ...",
"key1": {
"key2": "20171213T19:19:40.000-0500"
}
}
Incorrect behavior
If I'm updating the time value with the following request (please, note the nested JSON):
{
"objectType": "...",
"version": "...",
"query": {
... select the item above ...
},
"update": {
"$set": {
"key1": {
"key2": "20171214T00:19:40.000-0000"
}
}
},
"projection": [
{
"field": "key1",
"include": true,
"recursive": true
}
]
}
I'm receiving the UTC timezone in the projection as provided in the query (UTC, without any transformation):
{
"_id": "... any id ...",
"key1": {
"key2": "20171214T00:19:40.000-0000"
}
}
Can you, please, confirm, that such behavior isn't expected?
In some cases, I'm updating nested structures and it isn't a good idea to pop the time leafs in the query. How we can fix or workaround that?