Why does today() function always returns day in GMT instead of day in the current user time zone set in profile. To overcome this we had to build a rule to return date in user time zone. Is this expected behaviour of today() function because it is no where mentioned in documentation that function always returns date in GMT
Discussion posts and replies are publicly visible
a!localVariables( local!now: now(), local!dateFormat: text(local!now, "dd MM YYYY"), local!dateSplit: split(local!dateFormat, " "), local!todayDate: date( index(local!dateSplit, 3, null()), index(local!dateSplit, 2, null()), index(local!dateSplit, 1, null()) ), local!todayDate)This logic return current system date using now() function.
Wow, that's the most complicated way I have ever seen to create a date. We have the local() function to translate a date into the users timezone.
Great! Local return only datetime format. But this logic return date format.
Then, please wrap that into a todate().
Thank you Stefan!!