Author Daniel.O'Connor
Recipients Daniel.O'Connor, r.david.murray
Date 2011-08-15.14:23:43
SpamBayes Score 5.92908e-08
Marked as misclassified No
Message-id <E6F8BC0C-E2C3-4D3A-8828-4D9F0B2EE19A@dons.net.au>
In-reply-to <1313417386.16.0.809512171771.issue12750@psf.upfronthosting.co.za>
Content
On 15/08/2011, at 23:39, R. David Murray wrote:
> R. David Murray <rdmurray@bitdance.com> added the comment:
> 
> In what way does 'replace' not satisfy your need to set the tzinfo?

Ahh that would work, although it is pretty clumsy since you have to specify everything else as well.

In the end I used calendar.timegm (which I only found out about after this).

> As for utcnow, we can't change what it returns for backward compatibility reasons, but you can get a non-naive utc datatime by doing ´

That is a pity :(

> datetime.now(timezone.utc).  (I must admit, however, that at least this morning I can't wrap my head around how that works based on the docs :(.

OK.. I am only using 2.7 so I can't try that :)

> 
> ----------
> nosy: +r.david.murray
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue12750>
> _______________________________________
>
History
Date User Action Args
2011-08-15 14:23:44Daniel.O'Connorsetrecipients: + Daniel.O'Connor, r.david.murray
2011-08-15 14:23:44Daniel.O'Connorlinkissue12750 messages
2011-08-15 14:23:43Daniel.O'Connorcreate