Skip to content

fix ISO8601 related deprecation in time #3654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 14, 2023
8 changes: 3 additions & 5 deletions hls-graph/src/Development/IDE/Graph/Internal/Profile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ import Data.List (dropWhileEnd, foldl',
sortBy)
import Data.List.Extra (nubOrd)
import Data.Maybe
import Data.Time (defaultTimeLocale,
formatTime,
getCurrentTime,
iso8601DateFormat)
import Data.Time (getCurrentTime)
import Data.Time.Format.ISO8601 (iso8601Show)
import Development.IDE.Graph.Classes
import Development.IDE.Graph.Internal.Database (getDirtySet)
import Development.IDE.Graph.Internal.Paths
Expand Down Expand Up @@ -207,7 +205,7 @@ runTemplate ask = lbsMapLinesIO f
time <- getCurrentTime
pure $ LBS.pack $
"var version = \"0\"" ++
"\nvar generated = " ++ show (formatTime defaultTimeLocale (iso8601DateFormat (Just "%H:%M:%S")) time)
"\nvar generated = " ++ iso8601Show time
asker x = ask x

-- Perform a mapM on each line and put the result back together again
Expand Down