Mercurial Hosting > traffic-intelligence
diff python/utils.py @ 421:4fce27946c60
first example of video metadata using sqlalchemy
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 09 Oct 2013 23:25:51 -0400 |
parents | a9e275b4ecb7 |
children | f738fa1b69f0 |
line wrap: on
line diff
--- a/python/utils.py Tue Oct 08 18:26:20 2013 -0400 +++ b/python/utils.py Wed Oct 09 23:25:51 2013 -0400 @@ -11,6 +11,8 @@ delimiterChar = '%'; +datetimeFormat = "%Y-%m-%d %H:%M:%S" + ######################### # Enumerations ######################### @@ -546,7 +548,7 @@ self.calibrationFilename = config.get(sectionName, 'calibration-filename') self.videoFilename = config.get(sectionName, 'video-filename') self.frameRate = config.getfloat(sectionName, 'framerate') - self.date = datetime.strptime(config.get(sectionName, 'date'), "%Y-%m-%d %H:%M:%S") # 2011-06-22 11:00:39 + self.date = datetime.strptime(config.get(sectionName, 'date'), datetimeFormat) # 2011-06-22 11:00:39 self.translation = literal_eval(config.get(sectionName, 'translation')) # = [0.0, 0.0] self.rotation = config.getfloat(sectionName, 'rotation') self.duration = config.getint(sectionName, 'duration')