Skip to content

Sensible defaults for tzinfos #575

@jbrockmendel

Description

@jbrockmendel

So we don't want to hard-code tzinfos, but I claim that the following or something like it would be a Sensible Default for tzinfos (at least for US users)

tzinfos_us = {
    'PST': dateutil.tz.gettz('US/Pacific'),
    'PDT': dateutil.tz.gettz('US/Pacific'),
    'PT': dateutil.tz.gettz('US/Pacific'),
    'MST': dateutil.tz.gettz('US/Mountain'),
    'MDT': dateutil.tz.gettz('US/Mountain'),
    'MT': dateutil.tz.gettz('US/Mountain'),
    'CST': dateutil.tz.gettz('US/Central'),
    'CDT': dateutil.tz.gettz('US/Central'),
    'CT': dateutil.tz.gettz('US/Central'),
    'EST': dateutil.tz.gettz('US/Eastern'),
    'EDT': dateutil.tz.gettz('US/Eastern'),
    'ET': dateutil.tz.gettz('US/Eastern')}

There are others that are pretty close to unambiguous: BRST, CEST, ... If this would make it easier for a large fraction of users to Do It Right, then we should consider providing a shortcut to something like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions