Update pytz timezone definitions

Discussion in 'Python' started by _robby, Mar 13, 2008.

  1. _robby

    _robby Guest

    I am looking at using pytz in a scheduling application which will be
    used internationally. I would like to be able to update the definition
    files that pytz uses monthly or bi-monthly.

    As far as I can tell, pytz seems to be updated (fairly) regularly to
    the newest tzdata, but I don't want to have to update my pytz, just
    it's definitions.

    http://www.twinsun.com/tz/tz-link.htm says that pytz "compiles tz
    source into Python." Does this mean that there is already a method for
    updating the definitions?

    Any help would be greatly appreciated, even if it is to point out
    something obvious which I over looked.

    - Robby
    _robby, Mar 13, 2008
    #1
    1. Advertising

  2. _robby wrote:
    > I am looking at using pytz in a scheduling application which will be
    > used internationally. I would like to be able to update the definition
    > files that pytz uses monthly or bi-monthly.
    >
    > As far as I can tell, pytz seems to be updated (fairly) regularly to
    > the newest tzdata, but I don't want to have to update my pytz, just
    > it's definitions.
    >
    > http://www.twinsun.com/tz/tz-link.htm says that pytz "compiles tz
    > source into Python." Does this mean that there is already a method for
    > updating the definitions?
    >
    > Any help would be greatly appreciated, even if it is to point out
    > something obvious which I over looked.
    >
    > - Robby


    pytz's build process is rather complicated (e.g., a list of all time
    zones is appended to pytz/__init__.py). I really don't think it would be
    worth the effort.

    python-dateutil [1] [2] provides time zone support similar to pytz's,
    among other features. It keeps the time zone files in a tarball and I'm
    pretty sure it would be easy to update.

    I still don't get why you'd want to go to the effort though. Upgrading
    the whole package is easy. It's not like pytz gets a new API every version.

    [1] <http://labix.org/python-dateutil>
    [2] <http://pypi.python.org/pypi/python-dateutil/>
    --
    Matt Nordhoff, Mar 14, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. asaf
    Replies:
    3
    Views:
    6,144
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Sep 11, 2006
  2. Sanjay
    Replies:
    2
    Views:
    419
    Sanjay
    Jul 18, 2007
  3. Sanjay
    Replies:
    0
    Views:
    367
    Sanjay
    Jul 13, 2007
  4. axrock
    Replies:
    8
    Views:
    952
    Roedy Green
    Mar 25, 2009
  5. aspineux
    Replies:
    3
    Views:
    257
    aspineux
    Oct 21, 2011
Loading...

Share This Page