Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
7 subscribers
Views
2788 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
This may just be a UK specific question. Does anyone know why hour(no
steveb
over 8 years ago
This may just be a UK specific question.
Does anyone know why hour(now()) returns the GMT hour and not the BST hour and is there a way to get the correct (ie BST hour) ?
OriginalPostID-155590
OriginalPostID-155590
Discussion posts and replies are publicly visible
Parents
0
Lakshmi Meyyappan
over 8 years ago
I don't know exactly why, but I believe the now() function only returns the GMT datetime. The system generally displays it in your local time, but when you take specific numbers like the hour then it is actually using the returned GMT datetime.
To correct it simply use hour(local(now())). Wrapping now() in local() will add the necessary datetime offset to the GMT datetime.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Lakshmi Meyyappan
over 8 years ago
I don't know exactly why, but I believe the now() function only returns the GMT datetime. The system generally displays it in your local time, but when you take specific numbers like the hour then it is actually using the returned GMT datetime.
To correct it simply use hour(local(now())). Wrapping now() in local() will add the necessary datetime offset to the GMT datetime.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data