[Haskell-cafe] Parsing LocalTime from Unix seconds

Marc Busqué marc at lamarciana.com
Thu Sep 6 10:42:14 UTC 2018


In GHCi

```
:m +Data.Time
parseTimeM True defaultTimeLocale "%s" "1535684406" :: Maybe UTCTime
-- => Just 2018-08-31 03:00:06 UTC
parseTimeM True defaultTimeLocale "%s" "1535684406" :: Maybe LocalTime
-- => Just 1970-01-01 00:00:00
```

Why? ¯\(°_o)/¯

Marc Busqué
http://waiting-for-dev.github.io/about/


More information about the Haskell-Cafe mailing list