Fixed crash with call to tzname()

Fixed `'NoneType' object has no attribute 'encode'` crash with calls to tzname().