@@ -493,8 +493,9 @@ instance FromJSON ZonedTime where
493 parseJSON v = typeMismatch "ZonedTime" v
493 parseJSON v = typeMismatch "ZonedTime" v
495instance ToJSON UTCTime where
495instance ToJSON UTCTime where
496− toJSON t = String (pack (take 23 str ++ "Z"))
497− where str = formatTime defaultTimeLocale "%FT%T.%q" t
496+ toJSON t = String $ pack $ formatTime defaultTimeLocale format t
498+ format = "%FT%T." ++ formatMillis t ++ "Z"
498 {-# INLINE toJSON #-}
499 {-# INLINE toJSON #-}
500instance FromJSON UTCTime where
501instance FromJSON UTCTime where