diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-18 19:01:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-18 19:01:50 -0400 |
commit | b0f1b531a6e69aa27f41506691066a8ec8df1259 (patch) | |
tree | bee5c6e3c1f39143f1a68b33321f67494569e715 | |
parent | 2402266d0d9731445af1876327a43795795d1a18 (diff) |
better timestamp format
-rw-r--r-- | Logs/MetaData.hs | 6 | ||||
-rw-r--r-- | doc/metadata.mdwn | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/Logs/MetaData.hs b/Logs/MetaData.hs index 724f309ff..e1d2044cc 100644 --- a/Logs/MetaData.hs +++ b/Logs/MetaData.hs @@ -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. -} diff --git a/doc/metadata.mdwn b/doc/metadata.mdwn index d51758038..b2d020348 100644 --- a/doc/metadata.mdwn +++ b/doc/metadata.mdwn @@ -29,8 +29,8 @@ Here are some metadata fields that git-annex has special support for: * `year`, `month` - When this particular version of the file came into being. * `$field-lastchanged` - This is automatically maintained for each - field that's set, and gives the time stamp (since the Unix epoch) - of the most recent change to the field. It cannot be modified directly. + field that's set, and gives the date and time of the most recent + change to the field. It cannot be modified directly. To make git-annex automatically set the year and month when adding files, run `git config annex.genmetadata true`. Also, see |