Hello sh-utils/date maintainers, David MacKenzie,
Replying to myself :-)
At 2000-04-16 16:56, I wrote:
>Subject: Bug report: ISO 8601 timezone handling has minor buglet in src/date.c and
>lib/strftime.c and other 8601 issues
>....
>date '+%c %z' gave hhmm. Anyways, it would seem an extra %option should be
>added to strftime()? Or use a Conversion Specifier? (But I didn't find one
>for timezone in the Single Unix spec...). Anyways, the letter F (fix!) seems
>to be free ;-) (date '+%f' -> 02:00)
Markus Kuhn suggests a nice solution to this (%z -> 0200, %:z -> 02:00 !)
in his document "Proposed new <time.h> for ISO C 200X", url:
http://www.cl.cam.ac.uk/~mgk25/c-time/
sorry I missed that earlier, where he writes:
...
All conversion specifiers supported by strftime are also supported
by strfxtime, with the following extensions and modifications:
...
%z
is replaced by the offset from UTC in the ISO 8601 basic
format "-0430" (meaning 4 hours 30 minutes behind UTC, west
of Greenwich), or by no characters if no timezone offset is
determinable. If the format specifier is %:z, then it is replaced by
the ISO 8601 extended format "-04:30" with a colon
separating the hour and minute field. If the offset to UTC is an
integral number of hours, then the minute field and the colon are
omitted.
%Z
is identical to %z, except that the minute field is always present
when the hour field is present, even if it is zero.
Please excuse me again if this issue is well-known to you and if there are
already efforts underway. I don't mean to interfere, I am just curious, also
because this document of Markus is already there some time, date already has
the 'unofficial' %z and supports ISO 8601.
Bye-bye,
Eric Maryniak
--
Eric Maryniak <[EMAIL PROTECTED]>
Home page: http://pobox.com/~e.maryniak/
University of Amsterdam, Department of Psychology.
Tel/Fax: +31 20 5256853/6391656. Internet: http://www.neuromod.org/
Real programmers don't draw flowcharts.
Flowcharts are, after all, the illiterate's form of documentation.
Cavemen drew flowcharts; look how much it did for them.