[mirrorbrain-commits] [mod_stats] r68 - /trunk/tools/dlcount.py

From: <poeml_at_mirrorbrain.org>
Date: Thu, 01 Apr 2010 16:29:29 -0000
Author: poeml
Date: Thu Apr  1 18:29:28 2010
New Revision: 68

URL: http://svn.mirrorbrain.org/viewvc/mod_stats?rev=68&view=rev
Log:
ignore timezone offsets (we count per day), so to fix parsing when in daylight savings time.

Modified:
    trunk/tools/dlcount.py

Modified: trunk/tools/dlcount.py
URL: http://svn.mirrorbrain.org/viewvc/mod_stats/trunk/tools/dlcount.py?rev=68&r1=67&r2=68&view=diff
==============================================================================
--- trunk/tools/dlcount.py (original)
+++ trunk/tools/dlcount.py Thu Apr  1 18:29:28 2010
_at_@ -324,7 +324,8 @@
         rq.ua = ua
         rq.country = country.lower()
 
-        rq.tstamp = time.strptime(tstamp_raw, '%d/%b/%Y:%H:%M:%S +0100')
+        tstamp_raw = tstamp_raw.split()[0] # split off timezone offset - we ignore it
+        rq.tstamp = time.strptime(tstamp_raw, '%d/%b/%Y:%H:%M:%S')
         rq.tstamp_raw = tstamp_raw
 
         # apply the prefiltering rules




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Thu Apr 01 2010 - 16:29:34 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT