This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients
Date 2003-01-02.16:46:16
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=6380

I think that Phillip's proposal is reasonable: when you give
a tzinfo argument to datetimetz.fromtimestamp(), it should
*convert* to the given tzinfo. I think the proper semantics
are specified by this expression:

datetimetz.utcfromtimestamp(stamp).replace(tzinfo=utc).astimezone(tzinfo)

The rule for now() follows from this.

BTW, I think it was a mistake to let astimezone() convert
from/to naive times. It should only be used for conversion
between tz-aware times; conversion from/to naive time should
be done using dt.replace(tzinfo=...).
History
Date User Action Args
2007-08-23 14:09:37adminlinkissue660872 messages
2007-08-23 14:09:37admincreate