tzinfo

attribute 'tzinfo' of 'datetime.datetime' objects is not writable

How do I set the timezone of a datetime instance that just came out of the datastore? When it first comes out it is in UTC. I want to change it to EST. I'm trying, for example: class Book( db.Model ): creationTime = db.DateTimeProperty() When a Book is retrieved, I want to set its tzinfo immediately: book.creationTime.tzinfo =...

Printing correct time using timezones, Python

Extends Ok, we are not having a good day today. When you attach the correct tzinfo object to a datetime instance, and then you strftime() it, it STILL comes out in UTC, seemingly ignoring the beautiful tzinfo object I attached to it. # python 2.5.4 now = datetime.now() print now.strftime( "%a %b %d %X" ) # %X is "locale's...