#include <hallo.h> * Michael Stone [Wed, Feb 11 2009, 05:12:01PM]: > severity 514914 wishlist > tags 514914 wontfix > > On Wed, Feb 11, 2009 at 09:57:51PM +0100, Eduard Bloch wrote: >> See subject, setting the date is a popular source >> of confusion for non-US citizens. This problem is especially PITA >> because the string expected for -s is not documented well in the >> manpage. Just assuming that it's the same format as the one from date's >> output ends up in the missery shown in the log below. And when I try to >> use the popular middle-european format, it fails too, see #211508 for >> details. > > date's parser has all sort of issues, and there is no "expected string" > as it tries to be a natural language parser. My main inclination would
Natural for US citizens. Not so natural for others. > be to drop the natural language parsing entirely, as it has never really > worked. Unfortunately, debian's date would then be incompatible with > everyone else's. I don't see a realistic solution. Maybe you can > convince upstream to drop natural language parsing and replace it with Feel free to forward my mail to the upstream, I'm not sure about the appropriate contact address in Debian's documentation. > some structured format. I doubt that will go far upstream, either, > because of compatibility issues. Maybe an entirely new option with a > rational syntax? All it needs is someone to write it... > > FYI, ISO 8601 format mostly works (except that you can't use the T to > separate date and time): > >> date -d '2009-01-01 14:55' > Thu Jan 1 14:55:00 EST 2009 If locale based input parsing is doomed then the next logical solution is using a common format, and ISO 8601 is fine in this case, but then it should also be documented well! The manpage only talks about possible *output* formats ( and only mentions --rfc-2822 and --rfc-3339 there). >From user's perspective, even one single *complete* example of date and time setting somewhere on top of the manpage or in the --help output would help a lot, but there is nothing. Just a short reference to some "STRING". And the only documentation for that "STRING" can be found in the GNU info docs, but a) that requires the info reader program on the system and b) the hint needs to be found in the manpage which is looong. And a) and b) can be really complicated when you are setting up a machine in the wild having not much time and no internet connection. > Note that to set the time you don't need to mess with -s at all, you can > "simply" use >> date 010114552009 > as described in the man page. Which manpage? date(1) on my system says: date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]] So it looks like it should accept "-s 02112332" (for February 11th, 23:12). But it doesn't! Regards, Eduard. -- Der liebt nicht, der die Fehler des Geliebten nicht für Tugenden hält. -- Goethe, Maximen und Reflektionen, Nr. 645 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org