sn-time-ago showing 8h ago for tickets that were just created

austinn1
Kilo Expert

I have the following code

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

to show how long ago a ticket was created in a sp widget. In testing, I noticed that for tickets that were just created, it shows 8h ago, and as of an hour later, it shows 9h ago. I checked the data in the actual ticket itself and it is correct. Is there something special that needs to be done here? Am I going to have to handle that logic myself?

1 ACCEPTED SOLUTION

austinn1
Kilo Expert

I was getting the display value of the field in the server script. Changed to gr.getValue('sys_created_on') and the proper time difference is shown.

View solution in original post

6 REPLIES 6

austinn1
Kilo Expert

I was getting the display value of the field in the server script. Changed to gr.getValue('sys_created_on') and the proper time difference is shown.

hongsok
Tera Contributor

Hi Austinn,

I am have the same issue here. Which part of the Server Script that you change? Could you please share?

Regards,

Hong