Change time zone in Mendix - Mendix Forum

Change time zone in Mendix

0

Hi,

I am using local time zone in my system as Singapore time but still the system is taking the time zone as UTC. So can anyone help how to convert UTC time zone to Singapore time zone in microflow while saving the data in a field. For storing the time in UTC I am using formatDateTimeUTC($datatime) but to convert it to Singapore time zone or any other time zone what i need to do or how I can do it. 

asked
3 answers
2

Indeed as Alex says; DateTimes are always stored UTC. Displaying a value in the timezone is handled by the client, depending on browser timezone and handling on the server based on User timezone, app time zone and server time depending on the configuration.

See this academy module explaining more of this: https://academy.mendix.com/link/module/374/lecture/3046/7.1-Introduction

Additionally, is it required to have the time localized to Singapore time?? If app is only used in Singapore, then don’t localize the value. When user sets time to 9AM, it will be stored as 9AM and displayed and handled on the server as 9AM in all cases

And note; DateTime is always independent from Mendix a pain in the a&$

answered
0

Mendix will always store dateTime attributes in the DB as UTC and you cannot change that, see: https://docs.mendix.com/refguide/date-and-time-handling 

 

answered
0

Do you have localize set to yes?

answered