bos/aeson — pull request #173 by larskuhtz (2014-01-06 04:16:38+00:00)
Title: Fix JSON instance for UTCTime to yield a valid ISO8601 string

The current code does not yield a valid ISO8601 format string when the third fractional digit is `9` and the fourth digit is larger than `5`, since `succ '9' == ':'`. The following ghci session illustrates the issue

```haskell
> :set -XOverloadedStrings
> import Data.Aeson
> import Data.Time
> fmap show (decode "[ \"2014-01-06T02:50:34.0296Z\" ]" :: Maybe [UTCTime])
Just "[2014-01-06 02:50:34.0296 UTC]"
> fmap encode (decode "[ \"2014-01-06T02:50:34.0296Z\" ]" :: Maybe [UTCTime])
Just "[\"2014-01-06T02:50:34.02:Z\"]"
```

With this patch the value is simply truncated to milliseconds by rounding down.