Mendix REST service localized date

0
Hi, I wanted to know how Mendix exposes its datetime data through a REST service with the date localized. For instance, I’m in CST time and I enter a date of 1/1/2020 which defaults to 00:00:00 time. Mendix stores this date in UTC which becomes 1/1/2020 6:00:00 in the database. If I expose this data in a REST service and someone gets the data, will they see the datetime I entered, or will they see the UTC-converted datetime from the database?   Thank you for your help.
asked
2 answers
1

REST services always return UTC datetimes. The idea behind that is that REST services are being called by other systems. If those systems decide to show the date to a user, they can convert it into that user’s timezone.

answered
0

I suspect it will take the date/time (based on the time zone for this account) for the user you are calling the REST service with.  You can control the time zone they are on by creating a “new web service user”.  There is a button in the standard “Account_Overview” screen.  This screen allows you to select the time zone for this user (it is essentially just the new account screen).

Worth giving this a try on a test project.

answered