Message162660
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. |
|
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 | |
|