Fixed the time function. Now we need pytz module though