1.1 FPWD: error in derived-from-duration regexes

There is an error in the initialization algorithm for the local variable
mi in the setDateTimeFromRaw procedure:

>Let yr be rawYear when rawYear is not absent, dt's ˇyearˇ when dt's
>ˇyearˇ is not absent but rawYear is, and 1971 otherwise,

>mi be rawMi, dt's ˇminuteˇ , or 0, similarly

Since the object is to set the variable to a "raw" ("local timezone")
value, the defaults (which are normalized-to-Z values) should be
offset by the timezone:

   mi be rawMi, (dt's ˇminuteˇ + dt's ˇtimezoneˇ, or dt's ˇtimezoneˇ)
   when dt's ˇtimezoneˇ is not absent, and (dt's ˇminuteˇ, or 0)
   otherwise, similarly

This insures that subtracting the timzone later will restore the default
Z value.  Of course, the wording can no doubt be improved.  Other
formulations could be made that would preclude the necessity of adding
then subtracting the timezone value, since the net result of the
algorithm when the timezone is absent is just to normalize the
values and set the time.

N.B.:  Depending on the intended use, it might be necessary to
use lssNormalizeSecond rather than normalizeMinute, and such
a change would never hurt, so should also be made.
-- 
Dave Peterson
SGMLWorks!

davep@iit.edu

Received on Thursday, 9 September 2004 03:16:51 UTC