Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
I am a little puzzled here.
I need to check if a dateTime value is past a given hour of the day. But there is an issue, since it has an unpleasant behaviour : since we updated to summer time, it is wrong by 1 hour !
In my record type (and user interface), the dateTime will display "6/8/2026 5:48 PM GMT+02:00", so I assume my timezone has a two hours offset.
However, when I use function "timezone()", it gives "60", which would be adequate (and it did for a while!) when we would still be with winter time.
Why doesn't timezone() give 120?
How is this possible ? Is it a known bug ? (we are using release 25.3).
Do I have to create a specific constant with the right hour and remove the days to allow calculation?
Here is what I have now:
a!localVariables( local!dateBegin: now(), local!heure: hour(local!dateBegin) + timezone()/60, local!minute: minute(local!dateBegin), local!isAfter17h: or( local!heure > 17, and(local!heure = 17, local!minute > 0) ), local!dayEnd: todate(local!dateBegin) + if(local!isAfter17h, 1, 0),
[...]
but it is wrong between 5 and 6 PM
Discussion posts and replies are publicly visible
I was able to fix the issue by comparing a datetime() with a now() normalized with local().
a!localVariables( local!nowLocal: local(now()), local!today17: datetime( year(local!nowLocal), month(local!nowLocal), day(local!nowLocal), 17, 0, 0 ),
local!isAfter17h: local!nowLocal > local!today17,
local!dayEnd: todate(local!nowLocal) + if(local!isAfter17h, 1, 0),