The following code breaks in 7.7, claiming that the timezone name gotten from Calendar.TZnames.zones doesn't exist:
int main() { foreach (Calendar.TZnames.zones; string r1; array(string) r2s) foreach (r2s, string r2) { werror (r1 + "/" + r2 + "\n"); Calendar.ISO.Second()->set_timezone (r1 + "/" + r2); } }
That's a bug, right?
I'd say so, yes. The problem appears to be related to PCRE; if you disable the sections with #if constant(Regexp.PCRE.Studied) around them, the code works...
Or rather, the problem is that the code using PCRE, which was added in revision 1.41, doesn't do the same thing as the code not using PCRE...
---------------------------- revision 1.41 date: 2008/03/29 20:53:53; author: nilsson; state: Exp; lines: +15 -0 Improve lookup failure time for timezones with a factor of 1400. Patch from Mira r. ----------------------------
"Fort men fel" comes to mind... :-)
Hm. I never checked that much if my code actually did what it should, since Per's idea was much better.
pike-devel@lists.lysator.liu.se