Question: I need some random time zone but don't know how to do it using python. The time zone should be in GMT and in following format (Example).

```
(GMT-XX:YY) Place Name

```

Answer: 
You can try something like this.

```
#!/usr/bin/python3
import  pytz
import random
from datetime import datetime
randZoneName = random.choice(pytz.all_timezones)
randZone=datetime.now(pytz.timezone(randZoneName))
offset=randZone.strftime('%z')
print("(GMT%s:%s) %s"%(offset[:3],offset[3:],randZoneName))

```
To get a random timezone using `zoneinfo`:

```
#!/usr/bin/env python3

import random
import zoneinfo

def get_random_timezone():
    all_timezones = list(zoneinfo.available_timezones())
    random_timezone_key = random.choice(all_timezones)
    return zoneinfo.ZoneInfo(key=random_timezone_key)

# let's try it out...
get_random_timezone()

```