On Fri, 1 Aug 2003, Claus F�rber wrote: > Dave Rolsky <[EMAIL PROTECTED]> schrieb/wrote: > > That's going to take a while. I'd recommend using a year a little > > closer to our own. DT::TZ ships with the changes pre-generated 30 > > years out, so dates in that range are quick. > > Why does DT::TZ work that way? It should be possible to determine > whether a date is DST without generating data for all the years > inbetween.
Because this was relatively easy to implement. It uses more or less the same code as is used to generate the initial data set. > (The problem is, of course, that it will need year, month, and time > information for that and so probably must create a DT object w/ UTC > timezone ... or use DateTime::_rd2ymd) Well, it does that anyway. Basically it comes down to this being quite a bit easier than a sparse implementation. A sparse implementation would be more complex, especially since I'm afraid that someday we'll see a time zone with > 2 changes per year (you never know). If someone else wants to work on a patch, I'd be happy to accept it ;) However, what I'd really like to do is rewrite all of this in XS, at which point it might not make much difference. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
