New submission from Daniel O'Connor <dar...@dons.net.au>:

It isn't possible to add a timezone to a naive datetime object which means that 
if you are getting them from some place you can't directly control there is no 
way to set the TZ.

eg pywws' DataStore returns naive datetime's which are in UTC. There is no way 
to set this and hence strftime seems to think they are in local time.

I can sort of see why you would disallow changing a TZ once set but it doesn't 
make sense to prevent this for naive DTs.

Also, utcnow() returns a naive DT whereas it would seem to be more sensible to 
return it with a UTC TZ.

----------
components: Library (Lib)
messages: 142095
nosy: Daniel.O'Connor
priority: normal
severity: normal
status: open
title: datetime.datetime timezone problems
type: feature request
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12750>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to