better timestamp format

This commit is contained in:
Joey Hess 2014-03-18 19:01:50 -04:00
parent caa97d1271
commit 6848f09a12
Failed to extract signature
2 changed files with 4 additions and 6 deletions

View file

@ -75,11 +75,9 @@ getCurrentMetaData k = do
-- Makes each field have the timestamp as its value.
genlastchanged l =
let MetaData m = value l
ts = S.singleton $ toMetaValue $
formatTime defaultTimeLocale "%s" $
posixSecondsToUTCTime $
changed l
ts = S.singleton $ toMetaValue $ showts $ changed l
in M.map (const ts) m
showts = formatTime defaultTimeLocale "%F@%H-%M-%S" . posixSecondsToUTCTime
{- Adds in some metadata, which can override existing values, or unset
- them, but otherwise leaves any existing metadata as-is. -}