CLF = WTF?
ambassador at fourthworld.com
Sat Mar 7 14:28:39 CST 2009
I'm writing a web log analysis tool for my sites with Rev (why does
every hosting company's built-in log tool suck?), and after I parse out
the date stamp element I find it won't go through Rev's convert command
without throwing an error.
Apache's Common Log Format (CLF) uses this form for dates:
This is different from Rev"s "internet date", used by many other processes:
Sat, 7 Mar 2009 12:20:48 -0800
So my question here is twofold:
1. Why did whomever spec'd CLF invent a novel date format rather than
simply use a more prevelant form? Is there a benefit to this novelty
that I've overlooked? Or is it even all that novel? Heck, maybe it's
used throughout a million other web processes and I've just never
noticed it before; it would seem strange, though, that no one who's ever
worked on Rev noticed it either.
2. Right now I'm parsing the CLF date and reformatting it into "internet
date" using about a dozen lines of code, and maybe it could be
simplified a bit more but what I'd ideally like is the efficiency of a
one-liner. Anyone here know of a what to alter CLF dates into a form
that will survive Rev's "convert" command in one or two lines?
Revolution training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
More information about the use-livecode