forgot to add new module
This commit is contained in:
parent
6cf62a9bde
commit
a5a53ca011
1 changed files with 21 additions and 0 deletions
21
Logs/TimeStamp.hs
Normal file
21
Logs/TimeStamp.hs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{- log timestamp parsing
|
||||||
|
-
|
||||||
|
- Copyright 2015 Joey Hess <id@joeyh.name>
|
||||||
|
-
|
||||||
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
|
-}
|
||||||
|
|
||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
|
module Logs.TimeStamp where
|
||||||
|
|
||||||
|
import Data.Time.Clock.POSIX
|
||||||
|
import Data.Time
|
||||||
|
#if ! MIN_VERSION_time(1,5,0)
|
||||||
|
import System.Locale
|
||||||
|
#endif
|
||||||
|
|
||||||
|
import Common
|
||||||
|
|
||||||
|
parsePOSIXTime :: String -> Maybe POSIXTime
|
||||||
|
parsePOSIXTime s = utcTimeToPOSIXSeconds <$> parseTime defaultTimeLocale "%s%Qs" s
|
Loading…
Add table
Add a link
Reference in a new issue