- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2015 01:08 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2015 02:36 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2015 02:36 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2015 03:38 AM
Hi,
Just tested this. I was using targetrecord.opened_at, instead of targetrecord.opened_at.getDIsplayValue().
Thanks,
Pelo Ntwampe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2021 04:40 AM
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