How to convert svn repository change date to epoch timestamp?
mj-mailinglist at gmx.de
mj-mailinglist at gmx.de
Sun Nov 3 12:03:42 UTC 2019
Hi,
I am trying to convert the output of this command
svnlite info --show-item last-changed-date /usr/src/
to an epoch timestamp with base tools.
The output looks like this: 2019-11-03T07:11:09.005639Z
The date man page gives this example for converting dates:
date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s"
(maybe add the info, that you have to use LC_TIME=C for this example to work)
I came up with this date format string "%Y-%m-%dT%H:%M:%SZ" but this
lacks the fractions part of the seconds.
Is this possible with the tools in base?
Or maybe i could chop of the second-fractions?
--
Martin
More information about the freebsd-questions
mailing list