Eric Blake
2021-Dec-03 14:18 UTC
[Libguestfs] [PATCH libnbd] golang: make-dist.sh: Use strict ISO 8601 format
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 ands/fail/fails/> .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. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Nir Soffer
2021-Dec-03 15:50 UTC
[Libguestfs] [PATCH libnbd] golang: make-dist.sh: Use strict ISO 8601 format
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