- From: Dave Peterson <davep@iit.edu>
- Date: Wed, 8 Sep 2004 23:13:44 -0400
- To: Schema Comments <www-xml-schema-comments@w3.org>
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