pytz has so many timezones!
J. Clifford Dyer
jcd at sdf.lonestar.org
Mon Oct 8 14:00:28 EDT 2007
On Mon, Oct 08, 2007 at 10:41:03AM -0700, mensanator at aol.com wrote regarding Re: pytz has so many timezones!:
>
> On Oct 8, 2:32 am, Sanjay <skpate... at gmail.com> wrote:
> > Hi All,
> >
> > I am using pytz.common_timezones to populate the timezone combo box of
> > some user registration form. But as it has so many timezones (around
> > 400),
>
> There are only 25 timezones: -12, -11, ... -1, 0 (GMT), +1, ... +11,
> +12.
>
> A handful of countries set their clocks offset by a half hour,
> but those aren't timezones.
>
I'm sorry. By what even vaguely useful definition of "Timezone" is it not a timezone if it's offset by half an hour?
>
> The 400 you're seeing are duplications based on locality. Of the 86
> shown in Windows, all but 33 are dulplicate references to the same
> timezones.
>
> For example, Windows has seperate listings for
>
> Central America
> Central Time (US & Canada)
> Guadalahara, Mexico City, Monterry - New
> Guadalahara, Mexico City, Monterry - Old
> Saskatchewan
>
> but they are all GMT-6
>
Those are non-duplicate (and perhaps inaccurate, I'm not sure). US time switches from standard to Daylight Savings earlier than Mexico, and switches back later, as of this year. Reducing them to a single time zone will result in aberrant functionality in one or more locales.
Cheers,
Cliff
More information about the Python-list
mailing list