From 74bcbffa87b4ce321de9852d89fb6e761ca8f85c Mon Sep 17 00:00:00 2001 From: Kenny Lam Date: Wed, 2 Feb 2022 09:12:15 -0500 Subject: [PATCH 1/2] fix(footer): remove auto timestamp --- .../components/Footer/index.js | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/gatsby-theme-carbon/components/Footer/index.js b/src/gatsby-theme-carbon/components/Footer/index.js index 8cc109d1d..077ffba75 100644 --- a/src/gatsby-theme-carbon/components/Footer/index.js +++ b/src/gatsby-theme-carbon/components/Footer/index.js @@ -22,7 +22,7 @@ const CustomFooter = () => { .

- Last updated + Last updated Last updated Feb 01, 2022
Copyright © 2022 IBM

@@ -58,27 +58,6 @@ const CustomFooter = () => { }; useEffect(() => { - // Auto populate the last modified date - const lastModifiedTime = new Date(document.lastModified); - const dateOptions = { month: 'long' }; - - const month = new Intl.DateTimeFormat('en-US', dateOptions).format( - lastModifiedTime - ); - const day = lastModifiedTime.getUTCDate(); - const year = lastModifiedTime.getUTCFullYear(); - const hours = lastModifiedTime.getHours(); - const minutes = - lastModifiedTime.getMinutes() < 10 - ? `0${lastModifiedTime.getMinutes()}` - : lastModifiedTime.getMinutes(); - const ampm = hours >= 12 ? 'PM' : 'AM'; - - const div = document.getElementById('last-modified'); - if (div) { - div.innerHTML = `${month} ${day}, ${year} at ${hours}:${minutes}${ampm}`; - } - // Appends the data-autoid for the last footer item // eslint-disable-next-line no-undef const footer = document.getElementsByTagName('footer'); From 78718db44c9776da79efb9a9509ef2b13ad66b3b Mon Sep 17 00:00:00 2001 From: Jeff Chew Date: Wed, 2 Feb 2022 09:14:53 -0500 Subject: [PATCH 2/2] Update src/gatsby-theme-carbon/components/Footer/index.js Co-authored-by: andrew --- src/gatsby-theme-carbon/components/Footer/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gatsby-theme-carbon/components/Footer/index.js b/src/gatsby-theme-carbon/components/Footer/index.js index 077ffba75..72f83a75c 100644 --- a/src/gatsby-theme-carbon/components/Footer/index.js +++ b/src/gatsby-theme-carbon/components/Footer/index.js @@ -22,7 +22,7 @@ const CustomFooter = () => { .

- Last updated Last updated Feb 01, 2022 + Last updated Feb 01, 2022
Copyright © 2022 IBM