"Date" system

var javaScriptRelease = Date.parse(element["TimeStamp"]);
var dateOpened = new Date(javaScriptRelease);

Stored dateOpened as it is and use that line of code to display it:

<Text Alignment="Left" Row="0" Column="1" ColumnSpan="5" Value="Opened: {dateOpened}"></Text>

For information

console.log(element["TimeStamp"]); // Return [Viewport]: 2018-01-19T03:12:10.233

In the simulator: when displaying dateOpened, the system display the correct date as expected such as 01/19/2018 03:12:10

On the Android phone: display “uno.DateTime” instead of “01/19/2018 03:12:10”. Had to change “DateOpened” to “DateOpened…toString()” to get something I can work on (still need to find how to get the new format to a “proper” display format I prefer).

Expected: same behaviour on both platforms.

Hey!

I logged issue ticket.

If you work with dates, I suggest using moment.js which works fine with Fuse.

Hope this helps!

I would generally suggest to use JavaScript to do Date -> string formatting, instead of depending on the format DateTime.ToString() in Uno generates (which is what the code currently does).

I will have a look to it. the ToString() was a quick hack for me, late before stopping coding

The issue causing dates to print different values on different platforms has been fixed and will go out in 1.8. Javascript should still be used for date formatting wherever possible though, as the DateTime struct will always print its absolute time in UTC, which is probably not what’s desired when communicating to users.