Hi!
Can anyone suggest why my state is false?
If I use {{ Number(new Date().getHours()) }}
the result is the same
Hi!
Can anyone suggest why my state is false?
If I use {{ Number(new Date().getHours()) }}
the result is the same
Hi @axelandpixel3 Welcome to the community
I just tried the same expression (and just simply {{ new Date().getHours() }}
and am getting true, as expected:
Which version of n8n are you on, and how are you running n8n? The information in the template we ask for is a bit important here
Hi!
Sorry
Hmm, I’m not running into this on that version, either Could you share your full workflow with us by following these instructions? Export and import | n8n Docs
If you put the json code between two sets of three backticks (```) that’d be perfect!
i create new workflow and problem saved.
if value1 = 13 and value2 = 10 it’s retrun true, but if value1 = 13 and value2= 11 it’s return false
Now value1 = 14 for me, and if value2 = 11 it’s return true, but if value2 = 12 its return false.
Could it be a time zone issue? Maybe in the interface I see one result of time calculations, but “under the hood” it is completely different?
Hi @axelandpixel3 , I’m not sure but it’s possible as I’ve seen timezones cause strange issues before - do you have a specific timezone set for your environment in your Docker file? You can add this line with the correct timezone to your Docker compose file with the timezone you’re in, and that might make a difference.
yes, i use GENERIC_TIMEZONE.
I solved my problem. Need to use {{$now.hour}}
instead of new Date().getHours()
.
Thanks for your help and responsiveness! Have a nice day, it was fun
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.