Message142130
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>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2011-08-15 14:23:44 | Daniel.O'Connor | set | recipients:
+ Daniel.O'Connor, r.david.murray |
2011-08-15 14:23:44 | Daniel.O'Connor | link | issue12750 messages |
2011-08-15 14:23:43 | Daniel.O'Connor | create | |
|