{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances #-}
module Database.Relational.NonStandard.PureTimestampTZ () where
import Control.Applicative (pure)
import Data.Time (UTCTime, ZonedTime)
import Language.SQL.Keyword (Keyword (..))
import qualified Database.Relational.Internal.Literal as Lit
import Database.Relational.ProjectableClass (LiteralSQL (..))
instance LiteralSQL ZonedTime where
showLiteral' = pure . Lit.timestamp TIMESTAMPTZ "%Y-%m-%d %H:%M:%S%z"
instance LiteralSQL UTCTime where
showLiteral' = pure . Lit.timestamp TIMESTAMPTZ "%Y-%m-%d %H:%M:%S%z"