[Buildroot] [PATCH] support/download/svn: fix date format for archive creation
Yann E. MORIN
yann.morin.1998 at free.fr
Mon Feb 22 18:28:01 UTC 2021
Arnout, All,
On 2021-02-22 11:58 +0100, Arnout Vandecappelle spake thusly:
> On 20/02/2021 10:51, Yann E. MORIN wrote:
> > On 2021-02-19 15:21 -0600, Vincent Fazio spake thusly:
> >> Now the returned date is massaged to drop the sub-seconds.
[--SNIP--]
> A much simpler solution is
> date="$( date -d "${date}" -u +%Y-%m-%dT%T%:z )"
> which is fully portable over any POSIX-compliant version of date.
%:z is not POSIX, it's a GNU extension. However, we do not care about
computing the timezone: it's forcibly +00:00 becasue we do request -u.
Also, %T is OK, but to keep in line with the %Y-%m-%d part, I've
switched to %H:%M:%S.
Eventually, I've settled for:
> > But I wonder whether this should be svn-specific, or whether we should
> > move it into the generic herlper mk_tar_gz()... Arnout, thoughts?
> I would expect any sane VCS to be able to show the last change date in ISO 8601
> format - I'd hope that SVN is the exception rather than the rule...
Actually, sub-second precision *is* allowed by ISO8601. ISO8601 even
allows fractional parts after the last time element, eg.: 14:30,5 to
represent 14 hours, 30.5 minutes (i.e. 30min and 30s). The precision of
the fractional part is even left unspecified, with parties agreeing in
advance (or autodetectig, I'd guess):
https://en.wikipedia.org/wiki/ISO_8601#Times
So, svn *is* ISO8601-compliant.
Regards,
Yann E. MORIN.
> Regards,
> Arnout
>
> >
> > Regards,
> > Yann E. MORIN.
> >
> >> # Generate the archive.
> >> # We did a 'svn export' above, so it's not a working copy (there is no .svn
> >> # directory or file to ignore).
> >> --
> >> 2.30.0
> >>
> >
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list