How to use/convert UTC time instead of Session time?

0
Hi Everyone, Actually I am facing some issue with Date and Time Attribute in mendix because time zone difference. As I already set “Localize” value to “No” after this change system is displaying correct UTC date on page but while using attribute in microflow it is automatically using session time instead of UTC time.   How can use UTC time in microflow instead of Session time? or Can I convert Session time to UTC time? or Please suggest any other way to fix this issue?   Thanks and Regards, Samarth Jadhav
asked
1 answers
0

Hi,

If you want to keep you date time in UTC format, in your microflows you need to operate on that attribute using function call with UTC. For example parseDateTimeUTC(xxxxx, xxxx), if you will use that function, then date and time will be taken from UTC Time (2022-01-19 00:00:00.00).

If you will use simple parseDateTime it will be converted to session time of user, that executed this microflow – in your case – 2022-01-18 20:00:00.000 -0400.

Same with other functions formatDateTime, formatDate…

 

answered