How to Display exact time stamp in the Activity Stream of Service Portal

Gowtham Kodali
Tera Contributor

Is it possible to display the exact time stamp of the Activity Stream of Service Portal

For Example under any activity  it is displaying 2y ago, 2d ago instead is there any possibilty to display the exact time?

2 ACCEPTED SOLUTIONS

Najmuddin Mohd
Mega Sage

Hi  @Gowtham Kodali 

This comes from the widget named - Standard Ticket Conversations.
This widget is read - only. If you want to change anything you should be cloning it. Do it only if it necessary.

Steps:
1. Navigate to Service Portal > Widgets
2. Find the Widget with name : Standard Ticket Conversations
3. Open the record and below in the related links, click Open in widget editor.
4. In the HTML Template script check the 87th line.

<sn-time-ago timestamp="::e.sys_created_on"></sn-time-ago>

This is the one that is displaying as 2Y ago. Comment the code.
5. Add only the below code, 
{{::e.sys_created_on}}.

 

6. Save the record.

Now, navigate to page and open in Page Designer,

Remove the 'Standard Ticket Conversations' and add the cloned version of it.


Before:

NajmuddinMohd_1-1723152576223.png


After:

NajmuddinMohd_3-1723152694892.png

 

 

Hope this helps.

Regards,
Najmuddin.

View solution in original post

Hi @Gowtham Kodali ,
I tried it. Looks the possibility is less. The data is being fetched from the client script and looping is happening there.

Line 486 in the Client script of the widget. If it is really required, do have a look into this.

NajmuddinMohd_0-1723185708127.png

 


Please mark as helpful if the solution provides any help.

Regards,
Najmuddin.


View solution in original post

5 REPLIES 5

Najmuddin Mohd
Mega Sage

Hi  @Gowtham Kodali 

This comes from the widget named - Standard Ticket Conversations.
This widget is read - only. If you want to change anything you should be cloning it. Do it only if it necessary.

Steps:
1. Navigate to Service Portal > Widgets
2. Find the Widget with name : Standard Ticket Conversations
3. Open the record and below in the related links, click Open in widget editor.
4. In the HTML Template script check the 87th line.

<sn-time-ago timestamp="::e.sys_created_on"></sn-time-ago>

This is the one that is displaying as 2Y ago. Comment the code.
5. Add only the below code, 
{{::e.sys_created_on}}.

 

6. Save the record.

Now, navigate to page and open in Page Designer,

Remove the 'Standard Ticket Conversations' and add the cloned version of it.


Before:

NajmuddinMohd_1-1723152576223.png


After:

NajmuddinMohd_3-1723152694892.png

 

 

Hope this helps.

Regards,
Najmuddin.

Gowtham Kodali
Tera Contributor

Thank you najmuddin i am getting the timestamp but it is displaying in UTC timezone, is there any possibilty to display it in the logged in User timezone

Hi @Gowtham Kodali ,
I tried it. Looks the possibility is less. The data is being fetched from the client script and looping is happening there.

Line 486 in the Client script of the widget. If it is really required, do have a look into this.

NajmuddinMohd_0-1723185708127.png

 


Please mark as helpful if the solution provides any help.

Regards,
Najmuddin.


for journal entry  - You can add the below code to the server script to get the time in the logged in user's time zone  

 

Nadee33_0-1740076603170.png