From b6bc4ae6e1afce55fe4b85a87656b12cef70a231 Mon Sep 17 00:00:00 2001 From: Andrew Melton Date: Fri, 15 Feb 2013 11:31:53 -0500 Subject: [PATCH] Using str_time_to_unix() in process_raw_data() --- stacktach/views.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/stacktach/views.py b/stacktach/views.py index c458a37..bc76d14 100644 --- a/stacktach/views.py +++ b/stacktach/views.py @@ -364,15 +364,7 @@ def process_raw_data(deployment, args, json_args): when = body['timestamp'] except KeyError: when = body['_context_timestamp'] # Old way of doing it - try: - try: - when = datetime.datetime.strptime(when, "%Y-%m-%d %H:%M:%S.%f") - except ValueError: - # Old way of doing it - when = datetime.datetime.strptime(when, "%Y-%m-%dT%H:%M:%S.%f") - except Exception, e: - pass - values['when'] = dt.dt_to_decimal(when) + values['when'] = str_time_to_unix(when) values['routing_key'] = routing_key values['json'] = json_args record = STACKDB.create_rawdata(**values)