Convert UTC to IST

0
How can I convert time from UTC to IST
asked
3 answers
1

Hey Bhavin!

 

You will have to add hours and minutes to the UTC time to display the equivalent IST time. (Using addHours and addMinutes functions)

If I'm not mistaken it is 5:30+ 

 

image.png

answered
1

All datetimes are stored in UTC in Mendix. However, you can choose between localizing the date or not. If you localize it then it converts it to the local timezone when displaying.

 

There is a better description of how this works in the Mendix documentation.

 

https://docs.mendix.com/refguide/date-and-time-handling/#6-to-localize-or-not-to-localize

https://docs.mendix.com/refguide/attributes/#localize

answered
0

Hello,

 

To convert UTC TO IST we need to find out time difference. In this case the time difference is +05:30 hrs. With help of "addHours() & addMinutes()" functions we can convert UTC to IST time.

 

Follow below steps 

1. Create a variable (Datetime) then using "addHours()" function add 5 hours 

ex:- addHours($DefaultDateTime, 5) where $DefaultDateTime is your date time variable

2. Now using "addMinutes()" function add 30 minutes to the above variable which will give IST Time

 

addHours($DefaultDateTime, 5) --> This value will be stored in variable ISTTime

addMinutes($ISTTime, 30)

 

hope this helps...

Vijay

answered