on master help sign in
Document ZonedTime FromJSON instance.
commite2274831362a779438db0d5395ffccd8363cfd13 authorDimitri Sabadie <dimitri.sabadie@gmail.com> dateTue 11 Apr 2017, 11:04 (10 years ago) parent5aa86fa
1 file changed+11
Data/Aeson/Types/FromJSON.hs+11
Data/Aeson/Types/FromJSON.hs+11
@@ -1671,6 +1671,17 @@ instance FromJSONKey LocalTime where
16711671 fromJSONKey = FromJSONKeyTextParser (Time.run Time.localTime)
16721672
16731673
1674+-- | Supported string formats:
1675+--
1676+-- @YYYY-MM-DD HH:MM Z@
1677+-- @YYYY-MM-DD HH:MM:SS Z@
1678+-- @YYYY-MM-DD HH:MM:SS.SSS Z@
1679+--
1680+-- The first space may instead be a @T@, and the second space is
1681+-- optional. The @Z@ represents UTC. The @Z@ may be replaced with a
1682+-- time zone offset of the form @+0000@ or @-08:00@, where the first
1683+-- two digits are hours, the @:@ is optional and the second two digits
1684+-- (also optional) are minutes.
16741685instance FromJSON ZonedTime where
16751686 parseJSON = withText "ZonedTime" (Time.run Time.zonedTime)
16761687