Made compatible with Python 2.6 and removed pytz dependency for Python2