import re
from sfa.util.sfalogging import logger
-from sfa.util.py23 import StringType
SFATIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
# prepare the input for the checks below by
# casting strings ('1327098335') to ints
- if isinstance(input, StringType):
+ if isinstance(input, str):
try:
input = int(input)
except ValueError:
if isinstance(input, datetime.datetime):
#logger.info ("argument to utcparse already a datetime - doing nothing")
return input
- elif isinstance(input, StringType):
+ elif isinstance(input, str):
t = dateutil.parser.parse(input)
if t.utcoffset() is not None:
t = t.utcoffset() + t.replace(tzinfo=None)