Dates can be very confusing, but is actually quite simple: in the database all datetimestamps are stored in UTC, and when presented in a UI it usually shows the localized date&time, unless you define otherwise.
To get a good grip on the datetimestamp's content, set a breakpoint in you flow, just before you show the page. In the debugger the variable now shows first the UTC datetimestamp, followed by the localized date&time.
So your issue is about presentation. You have two options to make it show the UTC date:
- in the domain model, set the attribute's Type 'Localize' to false. Now always UTC is shown. And you are all set;
- or instead of showing the attribute in your page, rather create another variable having the value
formatDate($yourEntity/YourDateTimeAttribute, "yyyy-MM-dd")