[buildd-tools-devel] Bug#834736: Bug#834736: sbuild: Use basic format for ISO 8601 timestamps (for build logs filenames)

Johannes Schauer josch at debian.org
Thu Aug 18 17:17:00 UTC 2016


Hi,

Quoting Santiago Vila (2016-08-18 15:01:53)
> However, the way I read this:
> 
> https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations
> 
> there are still two allowed ways to specify the dates and the times:
> the "basic format" and the "extended format".
> 
> Both are standard and both are equally correct, but I wish there would
> be a way to use the basic format instead of the extended format, at least
> for the filenames of the build logs, if only because 20160818T113412Z
> is a lot easier to parse than 2016-08-18T11:34:12Z for further
> processing.

I'm confused about what the problem is that you want to report.

The current format of the datetime stamp in build log filenames is:

	2016-08-18T17:09:36Z

To parse that you write in most programming languages something like:

	strptime("2016-08-18T17:09:36Z", "%FT%TZ")

To parse a string like:

	20160818T113412Z

You would write:

	strptime("20160818T113412Z", "%Y%m%dT%H%M%SZ")

I find the former format string much easier and shorter than the one to parse
the latter.

So how is the latter easier to parse?

Thanks!

cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20160818/9cfc99d7/attachment.sig>


More information about the Buildd-tools-devel mailing list