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 belopolsky
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.02:27:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339468060.98.0.34357067838.issue9527@psf.upfronthosting.co.za>
In-reply-to
Content
Two objections have been raised to the proposed datetime.localtime() function:

1. It offers the third subtly different way to obtain current time in datetime module.  The first two being provided by datetime.now() and datetime.today().

2. C library localtime function takes POSIX timestamp as an argument, so datetime.localtime() should follow suit.

I attach a prototype patch for a different approach: make datetime.astimezone() method supply local timezone information if no argument is given.

This patch also demonstrates that extracting all TZ information that platform may have knowledge of is not trivial.
History
Date User Action Args
2012-06-12 02:27:41belopolskysetrecipients: + belopolsky, tim.peters, loewis, barry, jribbens, rhettinger, pboddie, jamesh, guettli, amaury.forgeotdarc, mark.dickinson, ncoghlan, davidfraser, 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 02:27:40belopolskysetmessageid: <1339468060.98.0.34357067838.issue9527@psf.upfronthosting.co.za>
2012-06-12 02:27:40belopolskylinkissue9527 messages
2012-06-12 02:27:39belopolskycreate