Message162660
| Author |
jamesh |
| Recipients |
Neil Muller, amaury.forgeotdarc, andersjm, barry, belopolsky, cameron, catlee, davidfraser, eric.araujo, erik.stephens, guettli, hodgestar, jamesh, jribbens, loewis, mark.dickinson, ncoghlan, pboddie, pitrou, python-dev, r.david.murray, rhettinger, steve.roberts, techtonik, tim.peters, tomster, vstinner, werneck |
| Date |
2012年06月12日.03:18:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1339471117.87.0.0351583425895.issue9527@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
One problem I can see with using a fixed offset tzinfo for localtime is that it might confuse people when doing date arithmetic. For example:
>>> d = datetime.localtime() + timedelta(days=7)
While it will give a correct answer as a point in time it will have the wrong time zone offset if run just before a daylight saving transition, which could be just as confusing.
I'm not sure how you'd solve this without e.g. importing pytz into the standard library though. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年06月12日 03:18:39 | jamesh | set | recipients:
+ jamesh, tim.peters, loewis, barry, jribbens, rhettinger, pboddie, guettli, amaury.forgeotdarc, mark.dickinson, ncoghlan, davidfraser, belopolsky, pitrou, andersjm, catlee, vstinner, techtonik, tomster, werneck, hodgestar, Neil Muller, cameron, eric.araujo, erik.stephens, steve.roberts, r.david.murray, python-dev |
| 2012年06月12日 03:18:37 | jamesh | set | messageid: <1339471117.87.0.0351583425895.issue9527@psf.upfronthosting.co.za> |
| 2012年06月12日 03:18:37 | jamesh | link | issue9527 messages |
| 2012年06月12日 03:18:35 | jamesh | create |
|