I work around it by doing SUBSTITUTE( someDate, "+0000", "+00:00")
That works fine I guess.
But I would like to find out if I should file a bug with my data source ?
On Tuesday, March 31, 2020 at 12:17:37 PM UTC+9, じょいすじょん wrote:
>
> I am doing DATE_DIFF(doc.date, prob.createdAt, "d", true)
> Where the dates are ISO8601 date strings for example:
> DATE_DIFF("2020-03-25T07:10:21Z", "2020-03-24T04:59:41+0000", "days", true)
> However, I always get null as the result.
> I tried ensuring they both show GMT and it is the same.
> What am I doing wrong here?
>
> When I create a query that just tests the DATE_DIFF function inputs
>
> //RETURN DATE_DIFF("2020-03-25T07:10:21Z", "2020-03-24T04:59:41+0000",
> "days", true)
> //RETURN DATE_DIFF("2020-03-25T07:10:21Z", "2020-03-27T07:10:21Z", "days",
> true)
> RETURN DATE_DIFF("2020-03-22T04:59:41+0000", "2020-03-24T04:59:41+0000",
> "days", true)
>
> I can see that any time the time zone is +0000 then the output is
> Warnings:
>
> [1572], 'in function 'DATE_DIFF()': invalid date value'
>
> Result:
>
> [
> null
> ]
>
> According to the spec and for easier reading Wikipedia
> https://en.m.wikipedia.org/wiki/List_of_UTC_time_offsets
>
> Z is +0000
>
> I inserted : in +0000 as +00:00 and now it works.
>
> Is this expected behavior or am I coming across a bug?
> I'm unable to confirm whether or not the offset needs the colon :
>
>
>
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/arangodb/c8f34aa4-602c-47ac-bd6a-971c7d6447ab%40googlegroups.com.