Service Portal created time on incident view showing wrong time

pooja V1
Mega Guru

Hello,

In Service Portal, when we open the incident view and in Activity timeline after incident is being created work notes is mentioned, as soon as the incident is created it shows created 5hr ago. But the actual time of incident created is different. When we hover over on the 5hr it shows wrong time.

When i print the data.created_on is getting the correct date and time, but why it is showing wrong there. can someone please help.

Attaching the screenshots of script and portal view.

Thanks,

Pooja

 

1 ACCEPTED SOLUTION

pooja V1
Mega Guru

I found the answer, 
From server side we are doing data.created_on = gr.getDisplayValue('sys_created_on') ,  when passing the display value to timestamp it id going back for 5hrs and setting the value. So, I changed that getDisplayValue to getValue() method and now the date and time is working correctly.

View solution in original post

5 REPLIES 5

Brian Lancaster
Tera Sage

Did you customize this widget?  On my OOB no day shows.  It just says created 2 hours ago.

@Brian Lancaster Just customized to see what is the value 'data.created_on' is getting to HTML.

I'm not sure on this one.  I have seen something similar where is was adding 5 hours to a date/time variable when a user manually type in the date and time in the wrong format. Eg left off the seconds.  It was a bug in the system which I believe was fixed in New York.

 

Note: My only other thought would be if you are in a different time zone then the submitter.

pooja V1
Mega Guru

I found the answer, 
From server side we are doing data.created_on = gr.getDisplayValue('sys_created_on') ,  when passing the display value to timestamp it id going back for 5hrs and setting the value. So, I changed that getDisplayValue to getValue() method and now the date and time is working correctly.