Date: Thu, 13 Aug 2015 21:50:50 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: strptime() lacks support for %z On Thu, Aug 13, 2015 at 08:56:47PM +0200, Jan Včelák wrote: > Hello list. > > (Please CC me in replies, I'm not subscribed to the list.) > > The strptime() function lacks support for %z (and %Z) format specifier. > > I'm mostly interested in '%z' because we are using it the Knot DNS > project and we have been notified by one of our users running Alpine > Linux that the previously written time stamps cannot be parsed. > > I want to contribute to musl by implementing the missing specifier. > But honestly I don't know how to start. The strptime() function needs > some refactoring otherwise the change would be ugly (or copy-pasta). It looks to me like it can just reuse numeric_range with a fixup at the end like what's done for 'want_century'. This should be a very small change, I think. > Are you interested in this feature? It seems reasonable to consider based on the criteria we usually go by, which are detailed in some old mailing list threads. (These should probably be polished up and added to the wiki.) > Please, can you point me to your > coding style guidelines? There are some very basic style guides on the wiki, but they mostly address presentation style, not the actual code content. At some point we should expand this to a proper coding style doc. For now the best general principle is to mimic the style of the code you're working on. > How can I check I haven't broken anything else? > Do you have unit tests or something? Yes, but I don't think there's good coverage for strptime. :( The test repo is here: http://nsz.repo.hu/git/?p=libc-test Contributions of tests for strptime or other functionality that currently lacks coverage would be very welcome too. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.