`True` and `True` may be slightly `False`

Hi there,
trying to evaluate a time difference I came across a (to me) wired situation and mybe someone with further insight can help me get my brain straight about this:

An IF Block uses an ISO formatted Timestamp and compares that against DateTime.now().

{{ DateTime.now() > DateTime.fromISO($json["firstseen"]) }}

From my expectation now should always be slightly larger than before now. So I used that statement for debugging. As I expected, the returned value is true. (See screenshot attached)

The IF block compares that result with constant true but seems to conclude:

True and True may be slightly False

Am I the only one confused about this? Maybe. But I am really bad at Javascript and finding such things leaves me in doubt if I have uncovered a mindful crafted feature or maybe a bug?

Version: 0.234.1

Hi @hinnerk - Interesting find here :eyes: Can you share some test data that we could also play around with? Knowing what you’re sending over to that combine node would also be really helpful, as it may be something else at play!

Hi HemaraldHerald,
at least I am not alone being confused :slight_smile:

The webhook receives Blog Posts. If they are in the database the Merge receives the previously stored dataset on Input 1 (I need the id from the Database to update the record and finally want to do some magic if an update happens after more than two days after firstseen.)

Here is a live sample from a testpost being redacted.

[
{
"id":511,
"postid":82,
"blogid":30,
"authorid":1,
"firstseen":"2023-07-10T10:39:14.000Z",
"feature":null,
"imgurl":" https://somesiteurl.com/image.png",
"title":" Another Test Post6",
"abstract":" Now we are a bit upset if this won’t work either… ",
"permalink":" https://somesiteurl.com/another-test-post/"
}
]

Input 2 is directly wired to the incomming Data from the webhook (containing the update information)

[
{
"PostId":"82",
"BlogId":"30",
"UserId":"1",
"Title":"Another Test Post7",
"Authorname":"Redacted",
"Blogname":"Redacted",
"Link":"https://somesiteurl.com/another-test-post/",
"Thumbnail":"https://somesiteurl.com/image.png",
"Abstract":"Now we are a bit upset if this won’t work either&#8230 äøåÖ… ",
"Channel":"",
"FeaturedImage":"https://somesiteurl.com/image.png"
}
]

The Merge Result is:

[
{
"id":511,
"postid":82,
"blogid":30,
"authorid":1,
"firstseen":"2023-07-10T10:39:14.000Z",
"feature":null,
"imgurl":" https://somesiteurl.com/image.png",
"title":" Another Test Post6",
"abstract":" Now we are a bit upset if this won’t work either… ",
"permalink":" https://somesiteurl.com/another-test-post/",
"PostId":"82",
"BlogId":"30",
"UserId":"1",
"Title":"Another Test Post7",
"Authorname":"Redacted",
"Blogname":"Redacted",
"Link":"https://somesiteurl.com/another-test-post/",
"Thumbnail":"https://somesiteurl.com/image.png",
"Abstract":"Now we are a bit upset if this won’t work either… äøåÖ… ",
"Channel":"",
"FeaturedImage":"https://somesiteurl.com/image.png"
}
]

Hi @hinnerk - thanks for sharing that! I can’t seem to reproduce this at all, it seems - it always is evaluating as “true”.

Do you have a full workflow where the problem can be reproduced simply by running the workflow with some example data?

Another thing you may want to do is try the Date/Time comparison in the If node instead, like this:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.