From f5643c10788cbacaffae0f191336bd481b3d00a4 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 11 May 2020 22:27:40 -0400 Subject: [PATCH] Allow an older version of time --- rib.cabal | 3 ++- src/Rib/Extra/OpenGraph.hs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rib.cabal b/rib.cabal index 0992f59..a9777d7 100644 --- a/rib.cabal +++ b/rib.cabal @@ -56,7 +56,8 @@ common library-common safe-exceptions, shake >= 0.18.5, text >=1.2.3 && <1.3, - time >= 1.9, + time, + iso8601-time, wai >=3.2.2 && <3.3, wai-app-static >=3.1.6 && <3.2, warp diff --git a/src/Rib/Extra/OpenGraph.hs b/src/Rib/Extra/OpenGraph.hs index 0f9dffd..fb311b2 100644 --- a/src/Rib/Extra/OpenGraph.hs +++ b/src/Rib/Extra/OpenGraph.hs @@ -12,7 +12,7 @@ module Rib.Extra.OpenGraph where import Data.Time (UTCTime) -import Data.Time.Format.ISO8601 (formatShow, iso8601Format) +import Data.Time.ISO8601 (formatISO8601) import Lucid import Lucid.Base (makeAttribute) import Relude @@ -84,7 +84,7 @@ instance ToHtml Article where metaOg "article:tag" `mapM_` _article_tag where metaOgTime k t = - metaOg k $ toText $ formatShow iso8601Format t + metaOg k $ toText $ formatISO8601 t -- Open graph meta element metaOg :: Applicative m => Text -> Text -> HtmlT m ()