Returns the pytz timezone for a given profile. Arguments: profile -- contains information related to the user (e.g., email address)
(profile)
| 82 | |
| 83 | |
| 84 | def getTimezone(profile): |
| 85 | """ |
| 86 | Returns the pytz timezone for a given profile. |
| 87 | |
| 88 | Arguments: |
| 89 | profile -- contains information related to the user (e.g., email |
| 90 | address) |
| 91 | """ |
| 92 | try: |
| 93 | return timezone(profile['timezone']) |
| 94 | except: |
| 95 | return None |
| 96 | |
| 97 | |
| 98 | def generateTinyURL(URL): |