[Libguestfs] [PATCH libnbd] golang: make-dist.sh: Use strict ISO 8601 format

Nir Soffer nsoffer at redhat.com
Fri Dec 3 15:50:50 UTC 2021


On Fri, Dec 3, 2021 at 4:18 PM Eric Blake <eblake at redhat.com> wrote:
>
> On Fri, Dec 03, 2021 at 12:18:27AM +0200, Nir Soffer wrote:
> > Go fail to parse the short date format (2021-11-30) from the @latest and
>
> s/fail/fails/

Thanks, I will amend before pushing.

>
> > .info file. Replace with %cI - strict ISO 8601 format.
> >
> > Signed-off-by: Nir Soffer <nsoffer at redhat.com>
> > ---
> >  golang/make-dist.sh | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
>
> >
> > +# Go wants a string in RFC 3339, git strict ISO 8601 format is
> > +# compatible.
> >  info="{
> >    \"Version\": \"$version\",
> > -  \"Time\": \"$(git show -s --format=%cs)\"
> > +  \"Time\": \"$(git show -s --format=%cI)\"
>
> Interesting that this preserves the timezone information of the committer.

It makes sense, and with timezone it is easy to compare just like UTC timestamp.

Nir




More information about the Libguestfs mailing list