python mktime fails with overflow (same call works in other environments)

Aran Cox arancox at gmail.com
Thu Sep 25 08:12:53 PDT 2008


Thanks for checking that for me. I just installed the binaries for
python so maybe I'll try building it via pkgsrc and see if that makes
any difference.



On Thu, Sep 25, 2008 at 08:09:51AM +0900, YONETANI Tomokazu wrote:
> On Wed, Sep 24, 2008 at 01:53:58PM -0500, Aran Cox wrote:
> > mktime is failing in python2.4 and python2.5 under DragonflyBSD 2.0
> > for certain date/times:
> > 
> > >>> from time import mktime
> > >>> tt=(2006, 4, 2, 2, 16, 27, -1, -1, -1)
> > >>> mktime(tt)
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> > OverflowError: mktime argument out of range
> > 
> > When I run the above python snippet on any other system I have access
> > to (Fedora 9, OpenBSD 4.1, etc.) I get:
> > 
> > >>> mktime(tt)
> > 1143944187.0
> 
> It works as expected(1143944187.0) here with python2.5 built from pkgsrc,
> on DragonFly 2.0 or 2.1.
> 
> Cheers.





More information about the Users mailing list