The published date for knowledge articles always shows "50y ago" on Service Portal if the system date format is set to "dd/MM/yyyy".


Steps to Reproduce

1. Edit the system property "glide.sys.date_format" ( / ).
2. Set the value to "dd/MM/yyyy" and save.
3. Log out and log in again.
4. Navigate to '/sp' Portal.
5. Click the head menu "Knowledge".
6. Select any of the Categories, for example "IT".
7. Click to open any article.
8. Observe the published date besides the calendar icon does not vary according to the real published timestamps stored in the knowledge articles.
All published dates are '50y ago' on both the "KB Category Page" widget (kb_category) and the "KB Article Page" widget (kb_article).


This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

The workaround consists in the following:

1. Navigate to 'Search Sources'.

2. Select 'Knowledge Bases'.

3. In the Search Page Template, replace:
${Published}: <sn-day-ago date="item.publishedUTC"/>

${Published}: <sn-day-ago date="item.publishedValue"/>

4. In the date fetch script, add:
article.publishedValue = result.meta.published.value;


5. Navigate to "sp_theme.list" in platform.

6. Pick the theme assigned to your Service Portal (on OOB instance, 'Stock' theme used for 'sp' portal).

7. Create a new JS include and add a new UI Script associated to it.

8. Copy/Paste the content of the attached file snDayAgo.txt into the Script field and submit it.

Related Problem: PRB1357259

Seen In

London Patch 8 Hot Fix 2a
SR - IntegrationHub - Microsoft Teams Integration v1.0.1
SR - IntegrationHub - Workplace by Facebook Integration v1.0.7
SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - PA Premium Integration - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Policy and Compliance PA Content - Madrid 2019 Q1
SR - IRM - Risk Management - New York 2019 Q3
SR - IRM - Vendor Risk Management - Madrid 2019 Q1
SR - ITOM - CMDB CI Class Models - 201908
SR - ITOM - Discovery and Service Mapping - 201908
SR - ITOM - Discovery and Service Mapping - v1.0.35
SR - ITOM - Fundamentals Istanbul Jakarta Kingston r1 - v5.99.6
SR - ITSM - Collaboration Services for Task Communications Management - v1.1
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Splunk Sighting Search Integration - Madrid 2019 Q1
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3

Fixed In

New York Patch 2

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-03-02 13:16:03