Archives Sept. 28, 2011
Find Equivalent Timezones with pytz?
Written by
on
in
Snaking.
Ran into a little problem today that requires being able to see what timezones (of the Linux-ish America/Toronto, America/Montreal variety) are equivalent to one another.:
#! /usr/bin/env python
"""Stupid little script to find equivalent timezones"""
import pytz, pprint, pickle, datetime
all_timezones = [pytz.timezone(name) for name in pytz.all_timezones]
def search():
now = datetime.datetime.now()
set = {} ...