Difference between two times (working ugly code, needs polish)

Shawn Milochik Shawn at Milochik.com
Wed Sep 12 02:31:06 CEST 2007


>
> I suppose really oneDay should be a global (i.e. outside the function
> definition). Apart from that it would be hard to improve on: obvious,
> easy to read, in short - pythonic.
>
> Are you concerned about daylight savings? That could certainly introduce
> a whole new level of complexity into the problem. Let's hope not ...

I'm not concerned with DST; this is a script which checks my Ebay
auctions (I have some things for sale), and sends me e-mail whenever
someone bids. It's run by cron every half hour -- it keeps me from
compulsively checking my auctions. ^_^

In any case, DST isn't an issue because the same machine generates
both timestamps, and all I use it for is to stop displaying auctions
after they are 10 days old, so I don't get all my old crap filling up
the alert e-mail or skewing the total dollar amount for all active
auctions.

Thanks.
Shawn



More information about the Python-list mailing list