-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
When I use the $moment function to process parent fields, there is no issue simple invocation. However, I subsequently call utc() function on $moment result, it returns current time.
I think the test2 should be 2021-01-02T11:00:12.000Z
original data
{
"createdDate": "2021-01-02T11:00:12Z",
"a": {
}
}
jsonata
(
a.(
$m := $moment(%.createdDate);
{
"test": %.createdDate,
"test1": $moment(%.createdDate),
"test2": $moment(%.createdDate).utc(),
"test3": $m.utc()
}
)
)
external libary
moment https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment.min.js

Metadata
Metadata
Assignees
Labels
No labels