Proposal for new ISO C 9x time API

Clive D.W. Feather clive at on-the-train.demon.co.uk
Thu Oct 8 19:28:57 UTC 1998


In message <E0zP2OP-00036M-00 at heaton.cl.cam.ac.uk>, Markus Kuhn
<Markus.Kuhn at cl.cam.ac.uk> writes
>> Another problem I foresee is that there is no way, given a timezone_t 
>> object, to retrieve the string used to construct it.  This might best
>> be another strfxtime directive.
>
>Which would mean that we have to force the implementor to store the
>original string. Is this really necessary? The user has provided the
>string himself, so why whould he depend on getting it back later. We
>certainly could easily add another strfxtime conversion specifier, but I
>wonder whether this is necessary at all.

I used to think along those lines, but realized that it is wrong. The
part of the program that sets the state might be totally unrelated to
the part that needs to retrieve it (perhaps to override it temporarily).
You can't rely on the two parts being able to be modified in sync.

Nor do you need to store the original string. You just need to recreate
one that will have the same effect.

-- 
Clive D.W. Feather   | Regulation Officer, LINX | Work: <clive at linx.org>
Tel: +44 1733 705000 | (on secondment from      | Home: <cdwf at i.am>
Fax: +44 1733 353929 |  Demon Internet)         | <http://i.am/davros>
Written on my laptop; please observe the Reply-To address



More information about the tz mailing list