log: When --raw-date is used, display only seconds from the epoch, as
documented, omitting a trailing "s" that was included in the output
before.
Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
* initremote: Avoid creating a remote that is not encrypted when gpg is
broken.
* rmurl, unannex: Support --json and --json-error-messages.
+ * log: When --raw-date is used, display only seconds from the epoch, as
+ documented, omitting a trailing "s" that was included in the output
+ before.
-- Joey Hess <id@joeyh.name> Sat, 08 Apr 2023 13:57:18 -0400
mkOutputter :: UUIDDescMap -> TimeZone -> LogOptions -> FilePath -> Outputter
mkOutputter m zone o file
- | rawDateOption o = normalOutput lookupdescription file show
+ | rawDateOption o = normalOutput lookupdescription file rawTimeStamp
| gourceOption o = gourceOutput lookupdescription file
| otherwise = normalOutput lookupdescription file (showTimeStamp zone)
where
showTimeStamp :: TimeZone -> POSIXTime -> String
showTimeStamp zone = formatTime defaultTimeLocale rfc822DateFormat
. utcToZonedTime zone . posixSecondsToUTCTime
+
+rawTimeStamp :: POSIXTime -> String
+rawTimeStamp t = filter (/= 's') (show t)