Skip to content

Commit

Permalink
Fix but with datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
UmSenhorQualquer committed Feb 26, 2018
1 parent df0b285 commit d63c4d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pybpodapi/com/messaging/base_message.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import dateutil
from datetime import datetime
from datetime import datetime as datetime_now


class BaseMessage(object):
Expand All @@ -14,7 +14,7 @@ class BaseMessage(object):
MESSAGE_COLOR = (200,200,200)

def __init__(self, content, host_timestamp=None):
self.pc_timestamp = datetime.now()
self.pc_timestamp = datetime_now.now()
self.host_timestamp = host_timestamp
self.content = content

Expand Down
6 changes: 3 additions & 3 deletions pybpodapi/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import logging, uuid
from pyforms import conf
from datetime import datetime
from datetime import datetime as datetime_now

import pybpodapi
#from pybpodapi.state_machine import StateMachine
Expand Down Expand Up @@ -40,7 +40,7 @@ def __init__(self, path=None):
self.trials = [] # type: list[Trial]
self.firmware_version = None # type: int
self.bpod_version = None # type: int
self.start_timestamp = datetime.now() # type: datetime
self.start_timestamp = datetime_now.now() # type: datetime

self.log_function = conf.PYBPOD_API_PUBLISH_DATA_FUNC

Expand All @@ -59,7 +59,7 @@ def __init__(self, path=None):

def __del__(self):
if self.csvwriter:
self.csvwriter.writerow( SessionInfo( self.INFO_SESSION_ENDED, datetime.now() ).tolist() )
self.csvwriter.writerow( SessionInfo( self.INFO_SESSION_ENDED, datetime_now.now() ).tolist() )
self.csvfile.close()


Expand Down

0 comments on commit d63c4d3

Please sign in to comment.