date:date-time()
Jeremy Kloth <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Organization | Fourthought, Inc |
| Message-ID | <[email protected]> |
The current spec for date-time() allows for either UTC (Z) or local (-/+HH:MM) timezones. If an implementation decides to use UTC there is no way to determine what the local offset would be. This also chains to the rest of the functions as they then operate only on the UTC date/time. There should be some way of working with both the UTC and offset-based timezones. Some ideas: - mandate that date:date-time() allows uses the offset notation; - have date:date-time() grow an optional boolean argument that specifies with to return the timezone in UTC or offset notation; - add an additional function, say date:convert-timezone(), that switches from offset to UTC notation; - add an addition function, date:utc-offset(), that returns a duration that represents the offset of the given date/time or current time. As it stands, the lack of control, by the user, over which format can cause confusion. For example, there was a comment on #4suite whether day-in-year() was working because it was returning 1 day later than it would have been if it was in local time. This issue needs to be resolved in some fashion, i'm leaning towards the optional argument to date:date-time(), that when present and true, UTC notation is used, otherwise offset notation. I choose offset notation as that is what is implemented by the Javascript versions and by the majority of the processors (all except 4Suite which defaults to 'Z'). -- Jeremy Kloth http://fourthought.com/ http://4suite.org/