Message13789
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=...). |
|
Date |
User |
Action |
Args |
2007-08-23 14:09:37 | admin | link | issue660872 messages |
2007-08-23 14:09:37 | admin | create | |
|