sys_updated_on, opened_at and sys_created_on show UTC instead of current time

Pelo Ntwampe
Mega Sage

Hi,

We have an issue where we use the sys_updated_on, opened_at and sys_created_on fields from the Incident table in a UI Page, but when the values of these fields are displayed, they're all on UTC/GMT date&time instead of the current date&time based on our timezone.

The activity log in the Incident record shows the correct date&time based on our timezone, but once we call these fields in the UI Page, the values are all in UTC/GMT date&time.

I have tested the UI Page by calling nowDateTime() and I get the correct date&time with our timezone.

Any ideas?

As a note, we recently updated our instances to Eureka Patch 9 Hot Fix 1 and one of our users noted the issue with the UI Page after that.

Thank you.

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Hi ,



How are you displaying the fields on the ui page??


If you use fieldName.getDisplayValue() to fetch the data and then display it then it will convert the date-time to the user's locale and also the user's format.


-Anurag

View solution in original post

3 REPLIES 3

Anurag Tripathi
Mega Patron
Mega Patron

Hi ,



How are you displaying the fields on the ui page??


If you use fieldName.getDisplayValue() to fetch the data and then display it then it will convert the date-time to the user's locale and also the user's format.


-Anurag

Hi,



Just tested this. I was using targetrecord.opened_at, instead of targetrecord.opened_at.getDIsplayValue().



Thanks,


Pelo Ntwampe


anezka_neckarov
Tera Contributor

Thank you Anurag, it works 🙂 

I just tried that.

 

recordGR.getValue('sys_created_on') -> returns UTC time 

recordGR.sys_created_on.getDisplayValue() -> returns user's time