API respose in Indian time.

1
Hi All,  I have created one publish rest services to send the data from my application, I have some fields which has date values (for example particular task is completed on xx date). Currently in API response it is showing UTC time format I also added Create date and Change date which are the system members and published it from my API, So these all date values are showing in UTC time format I want to publish all date values in Indian time Format (IST format). Please suggest me possible solution for this.   Thanks!
asked
5 answers
0

Hi Aditya,
For that attribute completed I believe that attribute is a type of DateTime and you wanna set Localize to yes. Maybe this is something you need to solve your problem?

answered
0

This attribute already checked the option as ‘Yes’, But still showing in UTC format.

 

answered
0

Hi Aditya, have you tried to set the timezone for the API-user to an indian timezone (like kolkata/asia).

on this way a currentdatetime represents the indian time and a parsedatetime will use the indian timezone.

you can also set your default timezone in your app to your timezone in the runtime settings

answered
0

One more question I have Change date and Create date is also showing in UTC format.

answered
0

IST time zone is UTC +5:30. Mendix always saves dates in UTC format. When your API provides the dates you mentioned, it could transform them using the addHours and addMinutes functions, i.e.

 

addMinutes(addHours(createdDate, 5), 30)

answered