diff --git a/appmon.py b/appmon.py index 3000635..531bc76 100644 --- a/appmon.py +++ b/appmon.py @@ -157,7 +157,7 @@ def on_detached(): print colored('[WARNING] "%s" has terminated!' % (app_name), 'red') def on_message(message, data): - current_time = time.strftime('%b %d %Y %l:%M %p', time.localtime()) + current_time = time.strftime('%b %d %Y %I:%M %p', time.localtime()) global output_dir if not os.path.exists(output_dir): os.makedirs(output_dir) @@ -357,4 +357,4 @@ def init_session(): except KeyboardInterrupt: script.unload() session.detach() - _exit_() \ No newline at end of file + _exit_() diff --git a/database/__init__.py b/database/__init__.py index 70a60e1..79a5d0d 100644 --- a/database/__init__.py +++ b/database/__init__.py @@ -23,7 +23,7 @@ def save_to_database(db_path, str_json): str_json = json.loads(str_json.replace("\n", "
").replace("\r", "
"), strict=False) db = dataset.connect('sqlite:///%s' % (db_path.replace("'", "_"))) table = db['api_captures'] - table.insert(dict(time=time.strftime('%b %d %Y %l:%M %p', time.localtime()), + table.insert(dict(time=time.strftime('%b %d %Y %I:%M %p', time.localtime()), operation=str_json['txnType'], artifact=json.dumps(str_json['artifact']), method=str_json['method'],