[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: strange python datetime issue on people.apache.org

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Fri, 14 May 2010 20:01:20 -0500

This mail was sent to commits_at_subversion.apache.org. Please don't send mail
to that list; it is for automatic commit notifications only.

On Fri, May 14, 2010 at 7:56 PM, Dongsheng Song <dongsheng.song_at_gmail.com>wrote:

> Hi forks,
>
> On my windows box (UTC+8), the following python code give me 22724
> (python 2.6.5 or 3.1.2), but on people.apache.org
>
> (python 2.6.4), I got
> :22722:
>
> from datetime import datetime;
> dt = datetime.now() - datetime(2000, 1, 1, 0, 0, 0);
> round((dt.days * 24 + dt.seconds / 3600) / 4)
>
> or
>
> from datetime import datetime;
> dt = datetime.now(None) - datetime(2000, 1, 1, 0, 0, 0, 0, None);
> round((dt.days * 24 + dt.seconds / 3600) / 4)
>
> Is there anything wrong ?
>
> Regards,
> Dongsheng
>
Received on 2010-05-15 03:01:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.