diff --git a/src/cleaners/date-published.js b/src/cleaners/date-published.js index e439a19f..1e214ab0 100644 --- a/src/cleaners/date-published.js +++ b/src/cleaners/date-published.js @@ -51,9 +51,12 @@ export default function cleanDatePublished( { timezone, format } = {} ) { // If string is in milliseconds or seconds, convert to int and return - if (MS_DATE_STRING.test(dateString) || SEC_DATE_STRING.test(dateString)) { + if (MS_DATE_STRING.test(dateString)) { return new Date(parseInt(dateString, 10)).toISOString(); } + if (SEC_DATE_STRING.test(dateString)) { + return new Date(parseInt(dateString, 10) * 1000).toISOString(); + } let date = createDate(dateString, timezone, format);