JustinAzoff / netflow-indexer

A program that uses xapian to index the flat file databases used by nfdump or flow-tools
http://justinazoff.github.com/netflow-indexer/
36 stars 4 forks source link

datetime.strptime does not exist in python2.4 #1

Closed JustinAzoff closed 13 years ago

JustinAzoff commented 13 years ago
return datetime.datetime.strptime(t,'%Y%m%d%H')

AttributeError: type object 'datetime.datetime' has no attribute 'strptime'

JustinAzoff commented 13 years ago

fix available here: http://stackoverflow.com/questions/2428746/datetime-command-line-argument-in-python-2-4

import time t = time.strptime("2010-02-02 7:31", "%Y-%m-%d %H:%M") t (2010, 2, 2, 7, 31, 0, 1, 33, -1) import datetime datetime.datetime(*t[:6]) datetime.datetime(2010, 2, 2, 7, 31)