Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82387

Localized DateTimes in Widgets

$
0
0

So I have a page in our app that is displaying Time portions of date-times using a CustomString widget, which is getting the time as a string from a Microflow that is just doing the following: formatDateTime($Statistics/Start,'HH:mm'). This attribute is localized in the Domain Model, and appears to be using the timezone set by the user (users can choose their own timezone).

I then have a custom widget which I have written that is getting another DateTime which is also localized in the Domain Model, and I am using the Time portion of that within the custom widget. However, this Time does not seem to be sent to the widget localized, it seems to be the UTC time. Is there something specific I need to do within the widget to either get the localized time, or to convert it? I did some searching in the API documentation but didn't find anything obvious. I would prefer to not have to use the browser UTC offset, but instead use the timezone set by the user in Mendix.

Anybody have some knowledge about this? Thanks!


Viewing all articles
Browse latest Browse all 82387

Trending Articles