Date Time in Entity and UI Screen Different
Question
Application Type
Reactive

I am having this date time issue , please see below;

As you can see recorded in the entity is 8 hours behind

But in the UI it is showing the correct time


I had  assign the datetimeout as follow ;

before i do the server action to create/update the record

Is it possible to have both the date time in UI and entity side to show the same value ?

Thank you in advance 

Hello jerah,

Entity data and time is store in the UTC only (standard time zone)/(Universal time co-ordinates)
and client side or UI side is converted as per your time zone

please check your time zone UTC+ 8 ?

edited : its automatic behavior of OutSystems in server its save UTC and on client side it will convert automatically to respective time Zone

Thanks and Regards,
Akshay Deshpande

Sorry i am still very new to outsystem can you advice me where do i apply this time zone UTC+ 8

Thank you

You don't have to do or apply anything, this is normal behaviour on reactive and mobile apps.  

As different users can be using your app in different timezones, by default all datetimes are in the user's timezone on the browser/device side, and are in the server's timezone on server / database side.

If your server is in UTC zone, then they are stored in UTC.

So yes it is a bit weird if you don't know about this, but ask yourself what problem you have with this for your use case, if the answer is none, then just leave this normal behaviour as is.

Dorine

Thank you for responding, so if my server zone is UTC then when i export i will need to add 8 hours to get Singapore time is my assumption correct ?

yes, you'll need to ask yourself in what timezone the report should be, and convert it.  Maybe not just add 8 hours, but use a conversion service (don't know about singapore, but some places have Daylight savings)

Hi Dorine,

Do you know if there is anyway to NOT make OutSystems convert the time? I have a usecase with a log table where I would like to show the UTC time (or CET/CEST) to make sure that the order is logical across timezones without having to think back to original time. 


Max

Hi Max, if I understand correctly, the logs are all recorded correctly in your servers timezon (UTC)  and you are developing some UI where you want to see it unconverted, so in UTC, no matter where the user is.

What you can do is add a calculated column to your aggregate and convert your datetime there.  Either to text, or split in 2 calculated columns one for the date part and one for the time part.  This should work, as this automatic conversion happens only for datetimes and only after server action or aggregate is done, I think.

Dorine

Hello jerah, 


Depend on your use case i believe You can use AddHours() function.


Hope this helps you!

Hello jerah,

You can adjust the time in your application if possible or else you can use the AddHours() function.

Regards,
Swapnil

@Ekjot Singh and @Swapnil Sinha : I don't think @Jerah is still waiting on an answer, this is an old post.

@Max de Groot : for future maybe better to start a new post referencing an old one than adding to the old one.

Hi Team , 
I am also facing the same issue . Got the solution from the forums to convert that field to Text ( Issue : Filter not work on it) or use AddHour()  (Not acceptable).

Any other way that we can apply on this issue. 

Regards :
Amrata

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.